spec/support/shared_examples.rb in zelda-1.2.0 vs spec/support/shared_examples.rb in zelda-1.2.1

- old
+ new

@@ -8,6 +8,15 @@ end it "should not respond to attributes not set in the constructor" do lambda { subject.no_not_here_nope }.should raise_error(NoMethodError) end + + it "allows successive initialization" do + list = [] + list << described_class.new(:foo => 'bar') + list << described_class.new(:foo => 'baz') + + list[0].foo.should eq('bar') + list[1].foo.should eq('baz') + end end \ No newline at end of file