Permalink
Browse files

move spec

  • Loading branch information...
jackdempsey committed Dec 2, 2008
1 parent afade8c commit 8c337d1b3cf89c00de0c6e493a94565fb7cc1a5a
@@ -0,0 +1,22 @@
+require File.dirname(__FILE__) + '/../spec_helper.rb'
+
+describe Tag do
+ before(:each) do
+ @tag = Tag.new
+ end
+
+ it "should have id and name properties" do
+ @tag.attributes.should have_key(:id)
+ @tag.attributes.should have_key(:name)
+ end
+
+ it "should have many Taggings" do
+ Tag.relationships.should have_key(:taggings)
+ end
+
+ it "should validate the presence of name" do
+ @tag.should_not be_valid
+ @tag.name = "Meme"
+ @tag.should be_valid
+ end
+end

0 comments on commit 8c337d1

Please sign in to comment.