Displaying 5 results from an estimated 5 matches for "clicks_button".
2008 Jun 24
1
Suggestions on how to use stub_model with webrat?
...my tests.
The webrat steps only care about the user interface and have nothing
to say about interaction with the database.
Following Ben Mabey, I have a line in my story like:
"When clicks the Create button"
And a step like:
When "clicks the $button button" do |button|
clicks_button button
end
Would it be sensible to extend it as follows:
"And clicks the Create button to create a new thing"
With step:
When "clicks the $button button to create a new $resource" do |button,
resource|
klass = resource.classify.constantize
stub_model(klass)
c...
2007 Dec 20
19
Story runner rake task
What''s the status on a rake task for the story runner. If nothing is
in progress, where could I start to try and build one?
JD
2008 Dec 02
4
Using Cucumber with latest Webrat
...ionController::Integration::Session:0x7f3d871693d0> (NoMethodError)
So I had to change the require in env.rb to
require ''webrat/rails''
It worked but I got the following deprecation errors:
visits is deprecated. Use visit instead.
fills_in is deprecated. Use fill_in instead.
clicks_button is deprecated. Use click_button instead.
I changed these in my steps file, and it worked fine.
The problem with requiring webrat from webrat_steps, is that when this
line is executed, the $LOAD_PATHS has not been modified to include the
plugin lib directories. That is done by support/env.rb. Th...
2008 Sep 30
4
Using the response object in stories
I have this statement in the layout of my application (using haml)
- if request.env["HTTP_USER_AGENT"].include?("MSIE")
= stylesheet_link_tag ''blueprint/ie.css''
= stylesheet_link_tag ''confirm_ie.css''
The problem is that request.env["HTTP_USER_AGENT"] is nil when I go to
some page in the features I write with cucumber and webrat
2007 Nov 29
5
Webrat 0.1.0 released - Ruby Acceptance Testing for Web applications
...t will let you
run your tests much faster and more frequently. (Benchmarks forthcoming.)
== SYNOPSIS:
def test_sign_up
visits "/"
clicks_link "Sign up"
fills_in "Email", :with => "good at example.com"
select "Free account"
clicks_button "Register"
...
end
Behind the scenes, this will perform the following work:
1. Verify that loading the home page is successful
2. Verify that a "Sign up" link exists on the home page
3. Verify that loading the URL pointed to by the "Sign up" link leads to a...