updating part2, far from finished

This commit is contained in:
2013-12-20 19:22:12 +01:00
parent 748944865d
commit b4c4a15e60
22 changed files with 2779 additions and 62 deletions
+2 -16
View File
@@ -14,8 +14,8 @@ Dir.glob("spec/acceptance_steps/**/*steps.rb") { |f| load f, true }
I18n.locale =I18n.default_locale
Devise.stretches = 1
#Capybara.javascript_driver = :webkit
Capybara.javascript_driver = :selenium
Capybara.javascript_driver = :webkit
#Capybara.javascript_driver = :selenium
module FactoryAttributesFor
def attributes_for(obj, options={})
@@ -27,20 +27,6 @@ module SpecSelectorHelpers
'.navbar-fixed-top'
end
# allows tests like:
# route_should_be 'agama_groups#index'
def route_should_be(route_def)
route_hash = case route_def
when String
controller_name, action_name = route_def.split('#')
#action_name = 'index' unless action_name.present?
{controller: controller_name, action: action_name}
else
route_def
end
Rails.application.routes.recognize_path(page.current_path).should include route_hash
end
# Uses the click_on method for capybara
def click_on_translation(key)
text = I18n.t(key)