Skip to content

Commit

Permalink
fixed spec stubs
Browse files Browse the repository at this point in the history
  • Loading branch information
dcrec1 committed May 6, 2009
1 parent 00663ef commit 75cffb6
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions spec/remarkable_acts_as_taggable_on_spec.rb
Expand Up @@ -5,20 +5,20 @@ class Person < ActiveRecord::Base

describe Remarkable::Acts::TaggableOn do
it "should confirm a model is acting as taggable on an attribute" do
Person.stub!(:categories)
Person.stub!(:category_list)
act_as_taggable_on(:categories).matches?(Person).should be_true
person = mock(Person, :categories => false,
:category_list => false)
act_as_taggable_on(:categories).matches?(person).should be_true
end

it "should confirm a model is not acting as taggable on an attribute" do
act_as_taggable_on(:members).matches?(Person).should be_false
act_as_taggable_on(:members).matches?(mock(Person)).should be_false
end

it "should confirm multiple tagging attributes at once" do
Person.stub!(:categories)
Person.stub!(:category_list)
Person.stub!(:tags)
Person.stub!(:tag_list)
act_as_taggable_on(:categories, :tags).matches?(Person).should be_true
person = mock(Person, :categories => false,
:category_list => false,
:tags => false,
:tag_list => false)
act_as_taggable_on(:categories, :tags).matches?(person).should be_true
end
end
end

0 comments on commit 75cffb6

Please sign in to comment.