updating part2, far from finished
This commit is contained in:
+2
-16
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user