Rspec 3.1 current_url == http://test.host/venues v application == http://www.example.com/venues

I am testing a rails application with rspec 3.1 with the following expectation:

expect(current_url).to eq venues_url

This results in the following failure:

Failure/Error: expect(current_url).to eq venues_url

       expected: "http://test.host/venues"
            got: "http://www.example.com/venues"

Why is there a difference between the pending domain and where does the application direct?

The test passes if I use expect(current_path).to eq venues_path

+4
source share

All Articles