Sha256: 5c975b4abf37b231ac7a9bad366e4e229ad7aad4948a61f34c2d28fe51a9edf6
Contents?: true
Size: 762 Bytes
Versions: 1
Compression:
Stored size: 762 Bytes
Contents
require 'spec_helper' describe 'Veritas::Attribute#options' do subject { object.options } let(:klass) { Attribute::Integer } context 'when no options are provided' do let(:object) { klass.new(:id) } it { should be_kind_of(Hash) } it { should be_empty } it { should be_frozen } end context 'when options are frozen' do let(:options) { {}.freeze } let(:object) { klass.new(:id, options) } it { should equal(options) } end context 'when options are not frozen' do let(:options) { {} } let(:object) { klass.new(:id, options) } it { should_not equal(options) } it { should be_kind_of(Hash) } it { should == options } it { should be_frozen } end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
veritas-0.0.2 | spec/unit/veritas/attribute/options_spec.rb |