Sha256: bc4df7476018ec26efa963a75059ae97ab7baae9711f88d71bcd97c69c64d763

Contents?: true

Size: 547 Bytes

Versions: 37

Compression:

Stored size: 547 Bytes

Contents

require 'test_helper'

# Fastly Util class tests
class Fastly
  class FooBar; end
  class FooBarBaz; end
  describe Util do
    describe '.class_to_path' do
      let(:klass)        { Fastly::FooBar }
      let(:klass_with_s) { Fastly::FooBarBaz }

      it 'should convert a class name to an underscored path' do
        assert_equal 'foo_bar', Util.class_to_path(klass)
      end

      it 'should append an s if second argument is true' do
        assert_equal 'foo_bar_bazs', Util.class_to_path(klass_with_s, true)
      end
    end
  end
end

Version data entries

37 entries across 37 versions & 1 rubygems

Version Path
fastly-1.10.0 test/fastly/util_test.rb
fastly-1.9.0 test/fastly/util_test.rb
fastly-1.8.0 test/fastly/util_test.rb
fastly-1.7.0 test/fastly/util_test.rb
fastly-1.6.1 test/fastly/util_test.rb
fastly-1.6.0 test/fastly/util_test.rb
fastly-1.5.0 test/fastly/util_test.rb
fastly-1.4.3 test/fastly/util_test.rb
fastly-1.4.2 test/fastly/util_test.rb
fastly-1.4.1 test/fastly/util_test.rb
fastly-1.4.0 test/fastly/util_test.rb
fastly-1.3.0 test/fastly/util_test.rb
fastly-1.2.3 test/fastly/util_test.rb
fastly-1.2.2 test/fastly/util_test.rb
fastly-1.2.1 test/fastly/util_test.rb
fastly-1.2.0 test/fastly/util_test.rb
fastly-1.1.5 test/fastly/util_test.rb