spec/motion-resource/base_spec.rb in motion-resource-0.1.3 vs spec/motion-resource/base_spec.rb in motion-resource-0.1.4
- old
+ new
@@ -63,7 +63,17 @@
shape1 = Shape.instantiate(:id => 6, :contents => 'nothing')
shape2 = Shape.instantiate(:id => 6, :contents => 'something')
shape1.should.be.identical_to shape2
shape1.contents.should == 'something'
end
+
+ it "should instantiate with ID number" do
+ shape = Shape.instantiate(3)
+ shape.id.should == 3
+ end
+
+ it "should instantiate with ID string" do
+ shape = Shape.instantiate("5")
+ shape.id.should == 5
+ end
end
end