spec/paginate/renderer_spec.rb in paginate-1.0.1 vs spec/paginate/renderer_spec.rb in paginate-2.0.0

- old
+ new

@@ -16,40 +16,40 @@ }) end specify { @renderer.render.should be_html_safe } - it "should parse simple url" do + it "parses simple url" do @renderer.options[:url] = "/some/path" - @renderer.url_for(1).should == "/some/path?page=1" + expect(@renderer.url_for(1)).to eql("/some/path?page=1") end - it "should parse url with page param" do + it "parses url with page param" do @renderer.options[:url] = "/some/path?page=3" - @renderer.url_for(1).should == "/some/path?page=1" + expect(@renderer.url_for(1)).to eql("/some/path?page=1") end - it "should parse url with page as first param" do + it "parses url with page as first param" do @renderer.options[:url] = "/some/path?page=3&a=1&b=2&c=3" - @renderer.url_for(1).should == "/some/path?a=1&b=2&c=3&page=1" + expect(@renderer.url_for(1)).to eql("/some/path?a=1&b=2&c=3&page=1") end - it "should parse url with page as last param" do + it "parses url with page as last param" do @renderer.options[:url] = "/some/path?a=1&b=2&c=3&page=3" - @renderer.url_for(1).should == "/some/path?a=1&b=2&c=3&page=1" + expect(@renderer.url_for(1)).to eql("/some/path?a=1&b=2&c=3&page=1") end - it "should parse url with page param in the middle" do + it "parses url with page param in the middle" do @renderer.options[:url] = "/some/path?a=1&b=2&page=3&c=3" - @renderer.url_for(1).should == "/some/path?a=1&b=2&c=3&page=1" + expect(@renderer.url_for(1)).to eql("/some/path?a=1&b=2&c=3&page=1") end - it "should parse url with page as arbitrary string" do + it "parses url with page as arbitrary string" do @renderer.options[:url] = "/some/path?a=1&b=2&c=3&page=abc" - @renderer.url_for(1).should == "/some/path?a=1&b=2&c=3&page=1" + expect(@renderer.url_for(1)).to eql("/some/path?a=1&b=2&c=3&page=1") end - it "should escape url from blocks" do + it "escapes url from blocks" do @renderer.options[:url] = proc {|page| "/some/path/#{page}?a=1&b=2"} - @renderer.url_for(1).should == "/some/path/1?a=1&b=2" + expect(@renderer.url_for(1)).to eql("/some/path/1?a=1&b=2") end end