spec/spec_helper.rb in divining_rod-0.4.0 vs spec/spec_helper.rb in divining_rod-0.5.0

- old
+ new

@@ -1,3 +1,12 @@ require 'rubygems' require 'spec' -require File.expand_path('../../lib/divining_rod', __FILE__) +require 'rack' +require File.expand_path('../../lib/divining_rod', __FILE__) + +def request_mock(opts) + opts = { + :host => 'example.com' + }.merge(opts) + env = {'HTTP_USER_AGENT' => opts[:ua], 'SERVER_NAME' => opts[:host], 'X_WAP_PROFILE' => opts[:wap_profile]} + mock('RailsRequest', :env => env, :format => opts[:format]) +end \ No newline at end of file