Sha256: 762d9d1bda48e2d0c6b3352b23249e863699ee9b2d7531ff031c3a69686b8a90
Contents?: true
Size: 452 Bytes
Versions: 3
Compression:
Stored size: 452 Bytes
Contents
shared_examples_for "a zelda base model" do it "should respond to the attributes set in the constructor" do described_class.new(:foo => 'bar').foo.should eq('bar') end it "should return nil for an attribute set to nil" do described_class.new(:foo => nil).foo.should be_nil end it "should not respond to attributes not set in the constructor" do lambda { subject.no_not_here_nope }.should raise_error(NoMethodError) end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
zelda-1.2.0 | spec/support/shared_examples.rb |
zelda-1.1.1 | spec/support/shared_examples.rb |
zelda-1.1.0 | spec/support/shared_examples.rb |