spec/unit/helpers/collection_spec.rb in activeadmin-1.0.0.pre2 vs spec/unit/helpers/collection_spec.rb in activeadmin-1.0.0.pre3
- old
+ new
@@ -43,23 +43,23 @@
end
end
describe "#collection_is_empty?" do
it "should return true when the collection is empty" do
- expect(collection_is_empty?(Post.where(title: "Non existing post"))).to be_truthy
+ expect(collection_is_empty?(Post.where(title: "Non existing post"))).to eq true
end
it "should return false when the collection is not empty" do
- expect(collection_is_empty?(Post.where(title: "A post"))).to be_falsey
+ expect(collection_is_empty?(Post.where(title: "A post"))).to eq false
end
it "should take the defined collection by default" do
def collection; Post.where(nil); end
- expect(collection_is_empty?).to be_falsey
+ expect(collection_is_empty?).to eq false
def collection; Post.where(title: "Non existing post"); end
- expect(collection_is_empty?).to be_truthy
+ expect(collection_is_empty?).to eq true
end
end
end