From 1c5d19ad71c97d32752330a95d78ae8cff325c79 Mon Sep 17 00:00:00 2001 From: Mario Visic Date: Fri, 25 Nov 2011 23:45:16 +1100 Subject: [PATCH] Fixed for locomotive setup test method. --- spec/support/locomotive.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/support/locomotive.rb b/spec/support/locomotive.rb index 374f90fd..1e27dc07 100644 --- a/spec/support/locomotive.rb +++ b/spec/support/locomotive.rb @@ -29,11 +29,11 @@ def Locomotive.configure_for_test(force = false) Locomotive.define_subdomain_and_domains_options - Object.send(:remove_const, 'Locomotive::Site') if Object.const_defined?('Locomotive::Site') + Locomotive.send(:remove_const, 'Site') if Locomotive.const_defined?('Site') load 'locomotive/site.rb' FactoryGirl.factories.clear - load File.join(Rails.root, 'spec', 'factories.rb') + load File.join(File.dirname(__FILE__), 'factories.rb') end end end