Commit e6801b9c3250e47543648a59b8ea69ff5f5d85af
1 parent
f79ff688
Exists in
master
and in
18 other branches
cucumber: set rails_env to cucumber instead of test
Showing
2 changed files
with
2 additions
and
2 deletions
Show diff stats
features/support/env.rb
... | ... | @@ -4,7 +4,7 @@ |
4 | 4 | # instead of editing this one. Cucumber will automatically load all features/**/*.rb |
5 | 5 | # files. |
6 | 6 | |
7 | -ENV["RAILS_ENV"] ||= "test" | |
7 | +ENV["RAILS_ENV"] ||= "cucumber" | |
8 | 8 | |
9 | 9 | require File.expand_path(File.dirname(__FILE__) + '/../../config/environment') |
10 | 10 | require 'cucumber/rails' | ... | ... |
lib/noosfero/plugin.rb
... | ... | @@ -157,7 +157,7 @@ class Noosfero::Plugin |
157 | 157 | unless @available_plugins |
158 | 158 | path = File.join(Rails.root, '{baseplugins,config/plugins}', '*') |
159 | 159 | @available_plugins = Dir.glob(path).select{ |i| File.directory?(i) } |
160 | - if Rails.env.test? && !@available_plugins.include?(File.join(Rails.root, 'config', 'plugins', 'foo')) | |
160 | + if (Rails.env.test? || Rails.env.cucumber?) && !@available_plugins.include?(File.join(Rails.root, 'config', 'plugins', 'foo')) | |
161 | 161 | @available_plugins << File.join(Rails.root, 'plugins', 'foo') |
162 | 162 | end |
163 | 163 | end | ... | ... |