Skip to content

Instantly share code, notes, and snippets.

@austenito
Created April 16, 2012 23:55
Show Gist options
  • Save austenito/2402415 to your computer and use it in GitHub Desktop.
Save austenito/2402415 to your computer and use it in GitHub Desktop.
require 'spec_helper'
describe "Order Summary" do
context "When I am on the order summary page" do
it "shows the shipping address for the order" do
visit new_shipping_address_path
fill_in "First name", :with => "Jeff"
fill_in "Last name", :with => "Casimir"
fill_in "Company", :with => "Jumpstart Lab"
fill_in "Street", :with => "1445 New York Ave NW"
fill_in "Apt/Suite", :with => "First Floor!"
fill_in "City", :with => "Washington"
fill_in "State", :with => "DC"
fill_in "Zipcode", :with => "20005"
fill_in "Phone Number", :with => "555-555-5555"
click_button("Create Shipping address")
current_path.should == new_billing_address_path
fill_in "First name", :with => "Jeff"
fill_in "Last name", :with => "Casimir"
fill_in "Company", :with => "Jumpstart Lab"
fill_in "Street", :with => "1445 New York Ave NW"
fill_in "Apt/Suite", :with => "First Floor!"
fill_in "City", :with => "Washington"
fill_in "State", :with => "DC"
fill_in "Zipcode", :with => "20005"
fill_in "Phone Number", :with => "555-555-5555"
click_button("Create Billing address")
current_path.should == order_summary_path
end
end
end
@j3j3
Copy link

j3j3 commented May 16, 2012

What an amazing gist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment