Rspec match current url

Viewed 5058

Want to check current url with required one

describe "SEO Error" do
    it "URL" do
      visit 'http://localhost:4000/'
      current_path.should == 'http://localhost:4000/'
    end
end

Got error like

Failure/Error: current_path.should == 'http://localhost:4000/'
   expected: "http://localhost:4000/"
        got: "/" (using ==)

Any idea?

2 Answers
Related