Created
August 9, 2013 13:28
-
-
Save braidn/6193581 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
require 'spec_helper' | |
feature "Add child", %q{ | |
as a user | |
when I log into my account | |
I can successfully add a kid | |
} do | |
let(:user) { Fabricate(:user) } | |
let(:kid) { Fabricate(:kid) } | |
before do | |
login_user | |
end | |
scenario 'with correct parameters' do | |
click_on 'My Children' | |
fill_in 'child_name', with: kid.name | |
fill_in 'child_age', with: kid.age | |
click_on 'Save New Child' | |
expect(Kid.count).to eq(1) | |
expect(Kid.last.user_id).to eq(user.id) | |
expect(current_page).to eq(user_path(user.id)) | |
expect(page).to have_content('Child Successfully Added') | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
John, just the items under scenario block