Created
August 25, 2010 21:00
-
-
Save levicole/550285 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Given /^I am on the "([^"]*)" item page$/ do |arg1| | |
| @item = Factory(:item, :name => arg1) | |
| visit item_path(@item) | |
| end | |
| Then /^I see the add to cart button$/ do | |
| page.should have_css("button", :text => "Add to cart") | |
| end | |
| When /^I click the "([^"]*)" button$/ do |arg1| | |
| click_button arg1 | |
| end | |
| Then /^I am on the cart page$/ do | |
| current_url.should == cart_url | |
| end | |
| Then /^I see the "([^"]*)" in my cart$/ do |arg1| | |
| page.should have_css("table#cart tr td.item_name", :text => arg1) | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment