Permalink
Browse files

Test for calling make on a class with no blueprint

Calling make on a class with no blueprint should raise an exception, and
a few submitted patches break this behaviour.
  • Loading branch information...
1 parent 97f0a5d commit 4af7ee4d958dfd0e25ade641a9a4ad448e41d750 @notahat notahat committed Aug 22, 2009
Showing with 4 additions and 0 deletions.
  1. +4 −0 spec/machinist_spec.rb
View
@@ -16,6 +16,10 @@ class Post
Person.clear_blueprints!
Post.clear_blueprints!
end
+
+ it "should raise for make on a class with no blueprint" do
+ lambda { Person.make }.should raise_error(RuntimeError)
+ end
it "should set an attribute on the constructed object from a constant in the blueprint" do
Person.blueprint do

0 comments on commit 4af7ee4

Please sign in to comment.