Sha256: 3d8d05cdce0799a9e159281514ca72760302f5cc514b8a73e8bca6ea230ab06e

Contents?: true

Size: 575 Bytes

Versions: 2

Compression:

Stored size: 575 Bytes

Contents

$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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
suhyo-0.0.6 spec/features/steps.rb
suhyo-0.0.5 spec/features/steps.rb