
Raisl 3 cucumber integration problem - certain web steps
Reported by kmandrup | February 22nd, 2010 @ 05:43 PM
We almost have a cucumber-rails for Rails 3 working:
Scenario: Register new person # features/manage_people.feature:6
Given I am on the new person page #
features/step_definitions/web_steps.rb:13
When I fill in "Name" with "name 1" #
features/step_definitions/web_steps.rb:33
And I press "Create" #
features/step_definitions/web_steps.rb:21
Then I should see "name 1" #
features/step_definitions/web_steps.rb:141
expected the following element's content to include "name 1": You
are being redirected. is not true.
(Test::Unit::AssertionFailedError)
./features/step_definitions/web_steps.rb:146:in /^(?:|I
)should see "([^\"]*)"$/'
features/manage_people.feature:10:in
Then I should see "name
1"'
web_steps.rb
Then /^(?:|I )should see \/([^\/])\/ within "([^"])"$/ do
|regexp, selector|
within(selector) do |content|
regexp = Regexp.new(regexp)
if defined?(Spec::Rails::Matchers)
content.should contain(regexp)
else
assert_match(regexp, content)
end
end end
Is Spec::Rails::Matchers called something different in Rails 3?
or how do we include it?
The assert doesn't seem to work either... ?
If we run the app manually in a browser, it works as expected and "name 1" is displayed after creating a new person by pressing the submit button.
Thanks for any assistance!
Comments and changes to this ticket
-
xinuc August 31st, 2010 @ 04:25 AM
- Milestone order changed from 0 to 0
for me, the problem is webrat not following redirect, and just return "You are being redirected"
I use webrat 0.7.2.beta.1
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
Ruby Acceptance Testing for Web applications.