Purged git history and removed sensitive information.

This commit is contained in:
Luke Barratt 2014-03-23 00:22:25 +00:00
commit 6bcc8dc76b
862 changed files with 25312 additions and 0 deletions

View file

@ -0,0 +1,23 @@
module Features
module FormHelpers
def fill_form(model, hash)
hash.each do |attribute, value|
fill_in attribute_translation(model, attribute), :with => value
end
end
def submit(model, action)
helper_translation(model, action)
end
private
def attribute_translation(model, attribute)
I18n.t("activerecord.attributes.#{model}.#{attribute}")
end
def helper_translation(model, action)
I18n.t("helpers.submit.#{model}.#{action}")
end
end
end

View file

@ -0,0 +1,10 @@
module Features
module SessionHelpers
def sign_in
visit root_path
user = create(:user)
fill_form(:user, { email: user.email, password: user.raw_password })
click_button '»'
end
end
end