From f8c64f25eca11a78cad519404a549d13fc8e37ec Mon Sep 17 00:00:00 2001 From: Thomas Reynolds Date: Fri, 25 May 2012 18:19:11 -0700 Subject: [PATCH] Put test ENV in the right place so cucumber/rake both work --- gem_rake_helper.rb | 2 -- middleman-core/features/support/env.rb | 2 ++ middleman-more/features/support/env.rb | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/gem_rake_helper.rb b/gem_rake_helper.rb index d61602cc..2ff1b22c 100644 --- a/gem_rake_helper.rb +++ b/gem_rake_helper.rb @@ -17,8 +17,6 @@ class Bundler::GemHelper end Cucumber::Rake::Task.new(:test, 'Run features that should pass') do |t| - ENV["TEST"] = "true" - exempt_tags = "" exempt_tags << "--tags ~@nojava" if RUBY_PLATFORM == "java" diff --git a/middleman-core/features/support/env.rb b/middleman-core/features/support/env.rb index a70b307d..efc3a3ad 100644 --- a/middleman-core/features/support/env.rb +++ b/middleman-core/features/support/env.rb @@ -1,3 +1,5 @@ +ENV["TEST"] = "true" + PROJECT_ROOT_PATH = File.dirname(File.dirname(File.dirname(__FILE__))) require File.join(PROJECT_ROOT_PATH, 'lib', 'middleman-core') require File.join(PROJECT_ROOT_PATH, 'lib', 'middleman-core', 'step_definitions') \ No newline at end of file diff --git a/middleman-more/features/support/env.rb b/middleman-more/features/support/env.rb index 357228d3..ae7aa9a2 100644 --- a/middleman-more/features/support/env.rb +++ b/middleman-more/features/support/env.rb @@ -1,3 +1,5 @@ +ENV["TEST"] = "true" + PROJECT_ROOT_PATH = File.dirname(File.dirname(File.dirname(__FILE__))) core_root = File.expand_path("../../../../middleman-core/lib/middleman-core", __FILE__)