README.textile in mechanical-cuke-0.2.0 vs README.textile in mechanical-cuke-0.3.0

- old
+ new

@@ -1,30 +1,22 @@ -h1. mechanical-cuke +h1. Mechanical Cuke -mechanical-cuke re-implements the Cucumber step definitions provided -by cucumber-rails in web_steps.rb in Mechanize. This allows Cucumber -features to be written for any site by running the tests over HTTP. +mechanical-cuke re-implements the Cucumber step definitions provided by cucumber-rails' web_steps.rb in Mechanize. This allows Cucumber features to be written for any site by running the tests over HTTP. h2. Rational -Webrat and Capybara both can drive tests over HTML. However, Webrat's -Mechanize support is limited (doesn't work with multipart forms, can't -submit empty form fields, no support for basis auth). Capybara drives -tests over HTTP using browsers, excellent for testing Javascript, but -slow for test that only involve HTML. +Webrat and Capybara both can drive tests over HTML. However, Webrat's Mechanize support is limited (doesn't work with multipart forms, can't submit empty form fields, no support for basic auth). Capybara drives tests over HTTP using browsers, excellent for testing Javascript, but slow for test that only involve HTML. h2. Usage Add: require 'mechanical-cuke' to features/support/env.rb -In features/support/paths.rb you will need to make sure you are -returning the full URL. The simplest way to do this is to add 'URL' + -before the case statement in the path_to function e.g.: +In features/support/paths.rb you will need to make sure you are returning the full URL. The simplest way to do this is to add 'URL' + before the case statement in the path_to function e.g.: bc. def path_to(page_name) case page_name becomes @@ -40,22 +32,20 @@ GET the page at _path_ and sets it to the current page for follow steps. bc. When I press "button" -Press button with label "_button_". If the button is in a form +Press button with label "_button_". If the button is in a form the form is submitted. bc. When I follow "link" Click the link with text "_link_". bc. When I fill in "field" with "value" When I fill in "value" for "field" -Fill in the text field, password field, or text area _field_ with -_value_. _field_ can be the id or name of the field, or the text -within the label for the field. +Fill in the text field, password field, or text area _field_ with _value_. _field_ can be the id or name of the field, or the text within the label for the field. bc. When I fill in the following: Takes a table of fields and values of the form: @@ -65,27 +55,24 @@ | Note | Nice guy | bc. When I select "value" from "field" -Selects the option with _value_ from select list _field_. _field_ can -be the id or name of the field, or the text within the label for the -field. +Selects the option with _value_ from select list _field_. _field_ can be the id or name of the field, or the text within the label for the field. bc. When I check "field" When I uncheck "field" -Check or uncheck "_field_". PENDING +Check or uncheck the checkbox "_field_". bc. When I choose "field" -Checks radio button _field_. _field_ can be the id or the text within -the label for the field; the field name would be ambiguous. +Checks radio button _field_. _field_ can be the id or the text within the label for the field; the field name would be ambiguous. When I attach the file "path" to "field" -Attach the file in _path_ to the file field _field_. PENDING +Attach the file in _path_ to the file field _field_. bc. Then I should see "text" Then I should see /regexp/ The body of the page should contain _text_ or _regexp_. @@ -96,24 +83,31 @@ The body of the page should *not* contain _text_ or _regexp_. bc. Then the "field" field should contain "value" Then the "field" field should not contain "value" -The value _field_ should be (or not be) _value_. PENDING +The value _field_ should be (or not be) _value_. bc. Then the "_field_" checkbox should be checked Then the "_field_" checkbox not should be checked -The checkbox _field_ should be (or not be) checked. PENDING +The checkbox _field_ should be (or not be) checked. bc. Then I should be on _path_ The path/uri of the current page should be _path_. bc. Then show me the page Save the current page and open in the default browser. -h2. Authors +h2. Todo -Spike Ilacqua +Add scopes to allow steps to function within an element e.g: +bc. When I press "Submit" within "#login_form" + +Make Rspec support actually work. + +h2. Author + +Spike Ilacqua