Skip to content

Commit

Permalink
Bumping gemspec again.
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Bleigh committed Mar 26, 2009
1 parent 8cbacc6 commit 08b9d7d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion acts-as-taggable-on.gemspec
@@ -1,6 +1,6 @@
Gem::Specification.new do |s|
s.name = "acts-as-taggable-on"
s.version = "1.0.4"
s.version = "1.0.5"
s.date = "2008-06-10"
s.summary = "Tagging for ActiveRecord with custom contexts and advanced features."
s.email = "michael@intridea.com"
Expand Down
13 changes: 12 additions & 1 deletion spec/acts_as_taggable_on/taggable_spec.rb
Expand Up @@ -105,6 +105,17 @@
bob.save
TaggableModel.find_tagged_with("spinning", :on => :rotors).should_not be_empty
end

it "should be able to use named scopes to chain tag finds" do
bob = TaggableModel.create(:name => "Bob", :tag_list => "fitter, happier, more productive", :skill_list => "ruby, rails, css")
frank = TaggableModel.create(:name => "Frank", :tag_list => "weaker, depressed, inefficient", :skill_list => "ruby, rails, css")
steve = TaggableModel.create(:name => 'Steve', :tag_list => 'fitter, happier, more productive', :skill_list => 'c++, java, python')

# Let's only find those productive Rails developers
TaggableModel.tagged_with('rails', :on => :skills).all(:order => 'taggable_models.name').should == [bob, frank]
TaggableModel.tagged_with('happier', :on => :tags).all(:order => 'taggable_models.name').should == [bob, steve]
TaggableModel.tagged_with('rails', :on => :skills).tagged_with('happier', :on => :tags).should == [bob]
end

describe "Single Table Inheritance" do
before do
Expand Down Expand Up @@ -133,4 +144,4 @@
AlteredInheritingTaggableModel.find_tagged_with("fork", :on => :parts).first.should == @inherited_different
end
end
end
end

0 comments on commit 08b9d7d

Please sign in to comment.