Skip to content
Browse files

fix specs

  • Loading branch information...
1 parent 89bdd28 commit dbbe2c07f6946f1562449f215c21cb60e469f710 @jackdempsey committed Dec 2, 2008
Showing with 5 additions and 4 deletions.
  1. +2 −1 lib/sequel_taggable/tag.rb
  2. +3 −3 spec/sequel_taggable/tag_spec.rb
View
3 lib/sequel_taggable/tag.rb
@@ -1,6 +1,7 @@
class Tag < Sequel::Model
one_to_many :taggings
-
+
+ validates_presence_of :name
# def taggables
# taggings.map{|tagging| tagging.taggable}
# end
View
6 spec/sequel_taggable/tag_spec.rb
@@ -6,12 +6,12 @@
end
it "should have id and name properties" do
- @tag.attributes.should have_key(:id)
- @tag.attributes.should have_key(:name)
+ @tag.should respond_to(:id)
+ @tag.should respond_to(:name)
end
it "should have many Taggings" do
- Tag.relationships.should have_key(:taggings)
+ Tag.associations.should include(:taggings)
end
it "should validate the presence of name" do

0 comments on commit dbbe2c0

Please sign in to comment.
Something went wrong with that request. Please try again.