Sha256: 2c1e41979f28036c33e0ef05e50f33f341498e5dfe8d39d1dd0b954d00ac9c5e
Contents?: true
Size: 506 Bytes
Versions: 16
Compression:
Stored size: 506 Bytes
Contents
require 'spec_helper' describe Virtus, 'instance level attributes' do subject do subject = Object.new subject.singleton_class.send(:include, Virtus) subject end let(:attribute) { subject.singleton_class.attribute(:name, String) } before do pending if RUBY_VERSION < '1.9' end context 'adding an attribute' do it 'allows setting the attribute value on the instance' do attribute subject.name = 'foo' expect(subject.name).to eql('foo') end end end
Version data entries
16 entries across 14 versions & 5 rubygems