Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add an example to Virtus::Attribute::Collection#member_type spec

  • Loading branch information...
commit df79b605b49a3a6b6282f0b66a38c12d9187101c 1 parent dd86c99
@solnic authored
Showing with 10 additions and 2 deletions.
  1. +10 −2 spec/unit/virtus/attribute/collection/member_type_spec.rb
View
12 spec/unit/virtus/attribute/collection/member_type_spec.rb
@@ -3,7 +3,15 @@
describe Virtus::Attribute::Collection, '#member_type' do
subject { object.member_type }
- let(:object) { Virtus::Attribute::Set.new('stuff', :member_type => Integer) }
+ context 'when specified' do
+ let(:object) { Virtus::Attribute::Set.new('stuff', :member_type => Integer) }
- it { should be(Integer) }
+ it { should be(Integer) }
+ end
+
+ context 'when not specified' do
+ let(:object) { Virtus::Attribute::Set.new('stuff') }
+
+ it { should be(Virtus::Attribute::Object) }
+ end
end
Please sign in to comment.
Something went wrong with that request. Please try again.