Sha256: bf74761cf2c5026329eef3bc7168a1cff0dd58d9cb4c7316ba158ad0abeca775

Contents?: true

Size: 444 Bytes

Versions: 7

Compression:

Stored size: 444 Bytes

Contents

require 'spec_helper'

describe Virtus::AttributeSet, '#[]' do
  subject { object[name] }

  let(:name)       { :name                                   }
  let(:attribute)  { mock('Attribute', :name => name)        }
  let(:attributes) { [ attribute ]                           }
  let(:parent)     { described_class.new                     }
  let(:object)     { described_class.new(parent, attributes) }

  it { should equal(attribute) }
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
virtus-0.0.10 spec/unit/virtus/attribute_set/element_reference_spec.rb
virtus-0.0.9 spec/unit/virtus/attribute_set/element_reference_spec.rb
virtus-0.0.8 spec/unit/virtus/attribute_set/element_reference_spec.rb
virtus-0.0.7 spec/unit/virtus/attribute_set/element_reference_spec.rb
virtus-0.0.6 spec/unit/virtus/attribute_set/element_reference_spec.rb
virtus-0.0.5 spec/unit/virtus/attribute_set/element_reference_spec.rb
virtus-0.0.4 spec/unit/virtus/attribute_set/element_reference_spec.rb