
Untitled
By: a guest on
May 5th, 2012 | syntax:
None | size: 0.65 KB | hits: 8 | expires: Never
module Spec
module IntegrationHelpers
# Signs the user in by filling up the form.
def sign_user_in_manually(user=Factory(:user))
visit new_user_session_path
fill_in "Email", :with => user.email
fill_in "Senha", :with => user.password
click_button "Entrar"
page.should have_content("VocĂȘ acessou o site com sucesso.")
user
end
# Does exists a link poining to this href and the defined options?
def have_link_to(url, options={})
have_css("a[href='%s']" % url, options)
end
def should_be_on(path)
URI.parse(current_url).path.should == path
end
end
end