webrat/spec/api/reload_spec.rb
2008-11-05 18:21:42 -05:00

16 lines
418 B
Ruby

require File.expand_path(File.dirname(__FILE__) + "/../spec_helper")
describe "reloads" do
before do
@session = Webrat::TestSession.new
@session.response_body = "Hello world"
end
it "should reload the page with http referer" do
@session.should_receive(:get).with("/", {})
@session.should_receive(:get).with("/", {}, {"HTTP_REFERER"=>"/"})
@session.visit("/")
@session.reloads
end
end