2008-05-12 03:58:20 +00:00
|
|
|
require File.expand_path(File.dirname(__FILE__) + "/../spec_helper")
|
|
|
|
|
|
|
|
describe "reloads" do
|
|
|
|
before do
|
|
|
|
@session = Webrat::TestSession.new
|
2008-05-12 04:23:37 +00:00
|
|
|
@session.response_body = "Hello world"
|
2008-05-12 03:58:20 +00:00
|
|
|
end
|
|
|
|
|
2008-08-20 08:35:57 +00:00
|
|
|
it "should reload the page with http referer" do
|
|
|
|
@session.should_receive(:get).with("/", {})
|
|
|
|
@session.should_receive(:get).with("/", {}, {"HTTP_REFERER"=>"/"})
|
2008-05-12 03:58:20 +00:00
|
|
|
@session.visits("/")
|
|
|
|
@session.reloads
|
|
|
|
end
|
|
|
|
end
|