Sha256: 31efda90022cacf30f7451931f9c3fa928da125202d2c707995d81a2ea0fe04b

Contents?: true

Size: 873 Bytes

Versions: 7

Compression:

Stored size: 873 Bytes

Contents

require File.join(File.dirname(__FILE__), 'spec_helper.rb')


describe Attributor do
  context '.resolve_type' do
    context 'given valid types' do
      {
        ::Integer => Attributor::Integer,
        Integer => Attributor::Integer,
        Attributor::Integer => Attributor::Integer,
        ::Attributor::Integer => Attributor::Integer,
        ::Attributor::DateTime => Attributor::DateTime,
        # FIXME: Boolean doesn't exist in Ruby, thus this causes and error
        # https://github.com/rightscale/attributor/issues/25
        #Boolean => Attributor::Boolean,
        Attributor::Boolean => Attributor::Boolean,
        Attributor::Struct => Attributor::Struct
      }.each do |type, expected_type|
        it "resolves #{type} as #{expected_type}" do
          Attributor.resolve_type(type).should == expected_type
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
attributor-2.6.0 spec/attributor_spec.rb
attributor-2.5.0 spec/attributor_spec.rb
attributor-2.4.0 spec/attributor_spec.rb
attributor-2.3.0 spec/attributor_spec.rb
attributor-2.2.1 spec/attributor_spec.rb
attributor-2.2.0 spec/attributor_spec.rb
attributor-2.1.0 spec/attributor_spec.rb