$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', '..', 'lib')) require File.expand_path(File.dirname(__FILE__) + '../../../lib/suhyo/webrat_steps.rb') module Suhyo module WebratMocks # Mock out some of the methods from Webrat def response @mock_response end def path_to(page_name) '/path' end def current_url @mock_current_url end end end World(Suhyo::WebratMocks) Given /^the response is (.+)$/ do |str| @mock_response = str end Given /^the current path is (.+)$/ do |str| @mock_current_url = 'http://test.host/' + str end