From 6efba915f69c00063b290f1620c9a12e6f4428f7 Mon Sep 17 00:00:00 2001 From: Joachim Filip Ignacy Bartosik Date: Wed, 13 Jul 2011 13:41:59 +0200 Subject: Fix code that produced warnings when running rake tasks --- site/Rakefile | 1 + site/spec/spec_helper.rb | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/site/Rakefile b/site/Rakefile index 25101e4..e22d6a7 100644 --- a/site/Rakefile +++ b/site/Rakefile @@ -4,4 +4,5 @@ require File.expand_path('../config/application', __FILE__) require 'rake' +include Rake::DSL Council::Application.load_tasks diff --git a/site/spec/spec_helper.rb b/site/spec/spec_helper.rb index 47ed37e..770b158 100644 --- a/site/spec/spec_helper.rb +++ b/site/spec/spec_helper.rb @@ -3,8 +3,7 @@ require File.expand_path("../../config/environment", __FILE__) require 'rspec/rails' require 'factories.rb' -RAILS_ROOT = "#{File.dirname(__FILE__)}/.." unless defined?(RAILS_ROOT) -environment_path = File.expand_path(File.join(RAILS_ROOT, 'config', 'environment')) +environment_path = File.expand_path(File.join(::Rails.root.to_s, 'config', 'environment')) require(environment_path) # Requires supporting ruby files with custom matchers and macros, etc, -- cgit v1.2.3-65-gdbad