cleaner way to set foodcoop scope
This commit is contained in:
parent
6da2fdee6d
commit
23a08b2ac8
1 changed files with 5 additions and 8 deletions
|
@ -44,6 +44,11 @@ RSpec.configure do |config|
|
|||
# --seed 1234
|
||||
config.order = "random"
|
||||
|
||||
config.before(:each) do
|
||||
# include default foodsoft scope in urls, so that *_path works
|
||||
default_url_options[:foodcoop] = FoodsoftConfig.scope
|
||||
end
|
||||
|
||||
config.include(SessionHelper)
|
||||
end
|
||||
|
||||
|
@ -56,11 +61,3 @@ module Faker
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
# include default foodsoft scope in urls, so that *_path works
|
||||
ActionDispatch::Integration::Runner.class_eval do
|
||||
undef default_url_options
|
||||
def default_url_options(options={})
|
||||
{foodcoop: FoodsoftConfig.scope}.merge(options)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue