Created
February 11, 2013 03:30
-
-
Save kris-luminar/4752280 to your computer and use it in GitHub Desktop.
trying to create an integration spec to test a nested resource (location is a nested resource of mailbox).
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
require 'spec_helper' | |
feature "Editing mailboxes" do | |
scenario "Updating a mailbox" do | |
let!(:mailbox) { Factory(:mailbox) } | |
let!(:location) { Factory(:location, :street_one => "6th NE", :street_two => "Kent NE", :zip => '99999', :city => "Auburn", :state => 'WA', :mailbox => mailbox) } | |
visit '/' | |
click_link '6th NE and Kent NE' | |
click_link 'Edit mailbox' | |
fill_in "Street One", :with => "7th NW" | |
click_link "Update mailbox" | |
page.should have_content "Mailbox has been updated" | |
page.should have_content "7th NW and Kent NE" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I've gotten farther along in the text and I'm now thinking something along these lines will do the trick: