Slide 47
Slide 47 text
feature “Tweet” do
scenario "valid tweet" do
create :user, username: "bob", password: "password"
create :user, username: "alice", password: "password"
visit "/"
fill_in "Username", with: "bob"
fill_in "Password", with: "password"
click_button "Log In"
fill_in "Tweet", with: "this is a test tweet noise noise noise noise noise noise noise noise noise noise noise noise
noise noise noise noise haha I'm less than 140 characters."
click_button "Submit"
page.should have_content "Your tweet was submitted"
visit "/bob"
page.should have_content "this is a test tweet noise noise noise noise noise noise noise noise noise noise noise
noise noise noise noise noise haha I'm less than 140 characters."
click_link "Log out"
visit "/"
fill_in "Username", with: "alice"
fill_in "Password", with: "password"
click_button "Log in"
page.should have_content "this is a test tweet noise noise noise noise noise noise noise noise noise noise noise
noise noise noise noise noise haha I'm less than 140 characters."
end
end