spec/search_spec.rb in binarylogic-searchlogic-2.1.8 vs spec/search_spec.rb in binarylogic-searchlogic-2.1.9

- old
+ new

@@ -38,10 +38,20 @@ search2.age_gt = 1 search2.all.should == User.all search1.all.should == [user2] end + it "should clone properly without scope" do + user1 = User.create(:age => 5) + user2 = User.create(:age => 25) + search1 = User.search(:age_gt => 10) + search2 = search1.clone + search2.age_gt = 1 + search2.all.should == User.all + search1.all.should == [user2] + end + it "should delete the condition" do search = User.search(:username_like => "bjohnson") search.delete("username_like") search.username_like.should be_nil end @@ -290,6 +300,6 @@ it "should recognize the order condition" do User.search(:order => "ascend_by_username").proxy_options.should == User.ascend_by_username.proxy_options end end -end \ No newline at end of file +end