webrat/spec/api/reload_spec.rb

16 lines
418 B
Ruby
Raw Normal View History

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"
end
it "should reload the page with http referer" do
@session.should_receive(:get).with("/", {})
@session.should_receive(:get).with("/", {}, {"HTTP_REFERER"=>"/"})
2008-11-05 23:20:27 +00:00
@session.visit("/")
@session.reloads
end
end