Sha256: d1ebf2bcfa407dd483419fd4da041641e1e9a1b273dab1c824e315d912260681

Contents?: true

Size: 276 Bytes

Versions: 12

Compression:

Stored size: 276 Bytes

Contents

require 'spec_helper'

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

  let(:model) {
    Class.new {
      include Virtus

      attribute :test, String
    }
  }

  let(:object) { model.new }

  before do
    object.test = 'foo'
  end

  it { should eq('foo') }
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
virtus-1.0.3 spec/unit/virtus/element_reader_spec.rb
virtus-1.0.2 spec/unit/virtus/element_reader_spec.rb
virtus-1.0.1 spec/unit/virtus/element_reader_spec.rb
virtus-1.0.0 spec/unit/virtus/element_reader_spec.rb
virtus-1.0.0.rc2 spec/unit/virtus/element_reader_spec.rb
virtus-1.0.0.rc1 spec/unit/virtus/element_reader_spec.rb
virtus-1.0.0.beta8 spec/unit/virtus/element_reader_spec.rb
virtus-1.0.0.beta7 spec/unit/virtus/element_reader_spec.rb
virtus-1.0.0.beta6 spec/unit/virtus/element_reader_spec.rb
virtus-1.0.0.beta5 spec/unit/virtus/element_reader_spec.rb
virtus-1.0.0.beta4 spec/unit/virtus/element_reader_spec.rb
virtus-1.0.0.beta3 spec/unit/virtus/element_reader_spec.rb