Permalink
Browse files

Add failing test

  • Loading branch information...
1 parent 33f922d commit dcdb931de48e197dd3d83198f00dc7d1b2ce58fd @unindented unindented committed Jan 25, 2012
Showing with 21 additions and 5 deletions.
  1. +21 −5 spec/acts_as_taggable_on/tagger_spec.rb
@@ -103,10 +103,26 @@
@user.is_tagger?.should(be_true)
end
- it "should skip save if skip_save is passed as option" do
- lambda {
- @user.tag(@taggable, :with => 'epic', :on => :tags, :skip_save => true)
- }.should_not change(ActsAsTaggableOn::Tagging, :count)
-
+ describe "Single Table Inheritance" do
+ before do
+ @user3 = InheritingTaggableUser.create
+ end
+
+ it "should have taggings" do
+ @user3.tag(@taggable, :with=>'ruby,scheme', :on=>:tags)
+ @user3.owned_taggings.size == 2
+ end
+
+ it "should have tags" do
+ @user3.tag(@taggable, :with=>'ruby,scheme', :on=>:tags)
+ @user3.owned_tags.size == 2
+ end
+
+ it "should return tags for the inheriting tagger" do
+ @user3.tag(@taggable, :with => 'ruby, scheme', :on => :tags)
+
+ @taggable.tags_from(@user3).sort.should == %w(ruby scheme).sort
+ end
end
+
end

0 comments on commit dcdb931

Please sign in to comment.