spec/deface/search_spec.rb in deface-1.0.1 vs spec/deface/search_spec.rb in deface-1.0.2
- old
+ new
@@ -9,18 +9,18 @@
:text => "<h1>Argh!</h1>")
end
describe "#find" do
it "should find by virtual_path" do
- Deface::Override.find({:virtual_path => "posts/index"}).size.should == 1
- Deface::Override.find({:virtual_path => "/posts/index"}).size.should == 1
- Deface::Override.find({:virtual_path => "/posts/index.html"}).size.should == 1
- Deface::Override.find({:virtual_path => "posts/index.html"}).size.should == 1
+ expect(Deface::Override.find({:virtual_path => "posts/index"}).size).to eq(1)
+ expect(Deface::Override.find({:virtual_path => "/posts/index"}).size).to eq(1)
+ expect(Deface::Override.find({:virtual_path => "/posts/index.html"}).size).to eq(1)
+ expect(Deface::Override.find({:virtual_path => "posts/index.html"}).size).to eq(1)
end
it "should return empty array when no details hash passed" do
- Deface::Override.find({}).should == []
+ expect(Deface::Override.find({})).to eq([])
end
end
describe "#find_using" do
before do
@@ -30,11 +30,11 @@
@override_template = Deface::Override.new(:virtual_path => "posts/index", :name => "Posts#show", :replace => "h1",
:template => "shared/person")
end
it "should find by virtual_path" do
- Deface::Override.find_using("shared/post").size.should == 1
- Deface::Override.find_using("shared/person").size.should == 1
+ expect(Deface::Override.find_using("shared/post").size).to eq(1)
+ expect(Deface::Override.find_using("shared/person").size).to eq(1)
end
end
end
end