Skip to content

Commit

Permalink
step files inadvertently omitted from previous commits
Browse files Browse the repository at this point in the history
  • Loading branch information
bret committed Jan 14, 2009
1 parent 55a43c1 commit 8bace2b
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
19 changes: 19 additions & 0 deletions taza/lib/steps/add_product_steps.rb
@@ -0,0 +1,19 @@
require 'spec'
$LOAD_PATH.unshift File.expand_path(File.dirname(__FILE__) + '/..')
require 'depot'

Given 'my cart is empty' do
empty_cart_page.goto
end
When /^I add to my cart (.*)$/ do | book_title |
store_page.goto
store_page.add_to_cart_button(book_title).click
end
Then 'the cart is displayed' do
@browser.url.should == your_cart_page.full_url
page_heading.should == 'Your Pragmatic Cart'
end

Then /^the order total is (.*)$/ do | total |
your_cart_page.total.should == total
end
10 changes: 10 additions & 0 deletions taza/lib/steps/world.rb
@@ -0,0 +1,10 @@
require 'spec'
$LOAD_PATH.unshift File.expand_path(File.dirname(__FILE__) + '/..')
require 'depot'

SITE = Depot::Depot.new
at_exit {SITE.close_browser_and_raise_if nil}

World do
SITE
end

0 comments on commit 8bace2b

Please sign in to comment.