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-3.0.2 test/fastly/util_test.rb
fastly-3.0.1 test/fastly/util_test.rb
fastly-3.0.0 test/fastly/util_test.rb
fastly-2.5.3 test/fastly/util_test.rb
fastly-2.5.2 test/fastly/util_test.rb
fastly-2.5.1 test/fastly/util_test.rb
fastly-2.5.0 test/fastly/util_test.rb
fastly-2.4.0 test/fastly/util_test.rb
fastly-2.3.1 test/fastly/util_test.rb
fastly-2.3.0 test/fastly/util_test.rb
fastly-2.2.0 test/fastly/util_test.rb
fastly-2.1.0 test/fastly/util_test.rb
fastly-2.0.0 test/fastly/util_test.rb
fastly-1.15.0 test/fastly/util_test.rb
fastly-1.14.0 test/fastly/util_test.rb
fastly-1.13.2 test/fastly/util_test.rb
fastly-1.13.1 test/fastly/util_test.rb
fastly-1.13.0 test/fastly/util_test.rb
fastly-1.12.0 test/fastly/util_test.rb
fastly-1.11.0 test/fastly/util_test.rb