Permalink
Browse files

Support Merb 1.0 webrat integration.

  • Loading branch information...
david committed Nov 8, 2008
1 parent 7277d39 commit 4e52bb206fd1f9a342eeb639750f31719738dadb
@@ -2,37 +2,37 @@
# http://github.com/brynary/webrat
When /^I go to (.*)$/ do |path|
- visits path
+ visit path
end
When /^I press "(.*)"$/ do |button|
- clicks_button(button)
+ click_button(button)
end
When /^I follow "(.*)"$/ do |link|
- clicks_link(link)
+ click_link(link)
end
When /^I fill in "(.*)" with "(.*)"$/ do |field, value|
- fills_in(field, :with => value)
+ fill_in(field, :with => value)
end
When /^I select "(.*)" from "(.*)"$/ do |value, field|
- selects(value, :from => field)
+ select(value, :from => field)
end
When /^I check "(.*)"$/ do |field|
- checks(field)
+ check(field)
end
When /^I uncheck "(.*)"$/ do |field|
- unchecks(field)
+ uncheck(field)
end
When /^I choose "(.*)"$/ do |field|
- chooses(field)
+ choose(field)
end
When /^I attach the file at "(.*)" to "(.*)" $/ do |path, field|
- attaches_file(field, path)
+ attach_file(field, path)
end
@@ -2,10 +2,10 @@ module Merb
module Test
module World
module Base
- include Merb::Test::Matchers
- include Merb::Test::ControllerHelper
- include Merb::Test::RouteHelper
- include Merb::Test::ViewHelper
+ include ::Merb::Test::Matchers
+ include ::Merb::Test::ControllerHelper
+ include ::Merb::Test::RouteHelper
+ include ::Merb::Test::ViewHelper
end
end
end
@@ -1,12 +1,13 @@
+require File.join(File.dirname(__FILE__), 'base')
require 'webrat'
require 'webrat/merb'
-require File.join(File.dirname(__FILE__), 'base')
module Merb
module Test
module World
- class Webrat < ::Webrat::Session
+ class Webrat
include Base
+ include ::Webrat::Methods
end
end
end

0 comments on commit 4e52bb2

Please sign in to comment.