From 0be3955cd77f16bb8f2dcdbaaad9be330213a43d Mon Sep 17 00:00:00 2001 From: wvengen Date: Wed, 24 Jul 2013 22:06:53 +0200 Subject: [PATCH] Revert "cleaner way to set foodcoop scope" This reverts commit 23a08b2ac8f86fcca91724ff1265b16941a24697. Conflicts: spec/spec_helper.rb --- spec/spec_helper.rb | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 25e445bc..69668880 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -44,11 +44,6 @@ 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 @@ -61,3 +56,11 @@ 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