Skip to content

Commit

Permalink
added spec for when there's no tags
Browse files Browse the repository at this point in the history
  • Loading branch information
s12chung committed Sep 1, 2012
1 parent b6ab591 commit 08321b9
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion spec/mongoid_taggable_with_context_spec.rb
Expand Up @@ -168,7 +168,17 @@ class M3
end

shared_examples_for "aggregation" do
context "retriving index" do
context "retrieving index" do
context "when there's no tags'" do
it "should return an empty array" do
klass.tags.should == []
klass.artists.should == []

klass.tags_with_weight.should == []
klass.artists_with_weight == []
end
end

context "on create directly" do
before :each do
klass.create!(:user => "user1", :tags => "food ant bee", :artists => "jeff greg mandy aaron andy")
Expand Down

0 comments on commit 08321b9

Please sign in to comment.