spec/models/user_spec.rb in recommendable-0.1.3 vs spec/models/user_spec.rb in recommendable-0.1.4
- old
+ new
@@ -62,18 +62,18 @@
end
it "should not be ignoring an item after liking it" do
@user.ignore(@movie)
@user.like(@movie).must_equal true
- @user.has_ignored?(@movie).must_equal false
+ @user.ignored?(@movie).must_equal false
@user.likes?(@movie).must_equal true
end
it "should not have an item stashed after liking it" do
@user.stash(@movie)
@user.like(@movie).must_equal true
- @user.has_stashed?(@movie).must_equal false
+ @user.stashed?(@movie).must_equal false
@user.likes?(@movie).must_equal true
end
it "should be able to dislike a recommendable item" do
@user.dislike(@movie).must_equal true
@@ -95,18 +95,18 @@
end
it "should not be ignoring an item after disliking it" do
@user.ignore(@movie)
@user.dislike(@movie).must_equal true
- @user.has_ignored?(@movie).must_equal false
+ @user.ignored?(@movie).must_equal false
@user.dislikes?(@movie).must_equal true
end
it "should not have an item stashed after disliking it" do
@user.stash(@movie)
@user.dislike(@movie).must_equal true
- @user.has_stashed?(@movie).must_equal false
+ @user.stashed?(@movie).must_equal false
@user.dislikes?(@movie).must_equal true
end
it "should be able to ignore a recommendable item" do
@user.ignore(@movie).must_equal true
@@ -114,49 +114,49 @@
it "should not like an item after ignoring it" do
@user.like(@movie)
@user.ignore(@movie).must_equal true
@user.likes?(@movie).must_equal false
- @user.has_ignored?(@movie).must_equal true
+ @user.ignored?(@movie).must_equal true
end
it "should not dislike an item after ignoring it" do
@user.dislike(@movie)
@user.ignore(@movie).must_equal true
@user.dislikes?(@movie).must_equal false
- @user.has_ignored?(@movie).must_equal true
+ @user.ignored?(@movie).must_equal true
end
it "should not have an item stashed after ignoring it" do
@user.stash(@movie)
@user.ignore(@movie).must_equal true
- @user.has_stashed?(@movie).must_equal false
- @user.has_ignored?(@movie).must_equal true
+ @user.stashed?(@movie).must_equal false
+ @user.ignored?(@movie).must_equal true
end
it "should be able to stash a recommendable item" do
@user.stash(@movie).must_equal true
end
it "should not stash a liked item" do
@user.like(@movie)
@user.stash(@movie).must_be_nil
@user.likes?(@movie).must_equal true
- @user.has_stashed?(@movie).must_equal false
+ @user.stashed?(@movie).must_equal false
end
it "should not stash a disliked item" do
@user.dislike(@movie)
@user.stash(@movie).must_be_nil
@user.dislikes?(@movie).must_equal true
- @user.has_stashed?(@movie).must_equal false
+ @user.stashed?(@movie).must_equal false
end
it "should not have an item ignored after stashing it" do
@user.ignore(@movie)
@user.stash(@movie).must_equal true
- @user.has_ignored?(@movie).must_equal false
- @user.has_stashed?(@movie).must_equal true
+ @user.ignored?(@movie).must_equal false
+ @user.stashed?(@movie).must_equal true
end
it "should not be able to rate or ignore an item that is not recommendable. doing so should not be enough to create Redis keys" do
@cakephp = Factory(:php_framework)