Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

more has_tags_on work

  • Loading branch information...
commit 1d399ea49b55bf91093285061d7aae3d6cb6943b 1 parent f4c6d14
@jackdempsey authored
Showing with 18 additions and 20 deletions.
  1. +18 −20 spec/sequel_taggable/sequel_taggable_spec.rb
View
38 spec/sequel_taggable/sequel_taggable_spec.rb
@@ -26,25 +26,23 @@ class HasTagsOnTestModel < Sequel::Model
end
lambda{HasTagsOnTestModel.has_tags_on(:should, 'not', :raise)}.should_not raise_error(ArgumentError)
end
- #
- # it "should create taggable functionality for each of the context names passed" do
- # class TestModel
- # include DataMapper::Resource
- # property :id, Integer, :serial => true
- #
- # has_tags_on(:pets, 'skills', :tags)
- # end
- # TestModel.should be_taggable
- # a = TestModel.new
- # a.should be_taggable
- # a.should respond_to(:pet_list)
- # a.should respond_to(:skill_list)
- # a.should respond_to(:tag_list)
- # a.should respond_to(:pet_list=)
- # a.should respond_to(:skill_list=)
- # a.should respond_to(:tag_list=)
- # end
- # end
+
+ it "should create taggable functionality for each of the context names passed" do
+ class TestModel < Sequel::Model
+ is :taggable
+ has_tags_on(:pets, 'skills', :tags)
+ end
+ TestModel.should be_taggable
+ a = TestModel.new
+ a.should be_taggable
+ a.should respond_to(:pet_list)
+ a.should respond_to(:skill_list)
+ a.should respond_to(:tag_list)
+ a.should respond_to(:pet_list=)
+ a.should respond_to(:skill_list=)
+ a.should respond_to(:tag_list=)
+ end
+ end
#
# describe ".has_tags" do
# it "should create a taggable with 'tags' context regardless of passed arguments" do
@@ -66,5 +64,5 @@ class HasTagsOnTestModel < Sequel::Model
# a.should_not respond_to(:skill_list=)
# a.should_not respond_to(:skills)
# end
- end
+ #end
end
Please sign in to comment.
Something went wrong with that request. Please try again.