Permalink
Browse files

Merge pull request #12778 from etehtsea/rake-default-fix

Don't load test env by default.

Closes #13241

Conflicts:
	railties/CHANGELOG.md
  • Loading branch information...
1 parent 17b5aac commit a263d0b368fbd074bff3ee9058d13b457eaa3116 @rafaelfranca rafaelfranca committed Mar 28, 2014
Showing with 6 additions and 1 deletion.
  1. +5 −0 railties/CHANGELOG.md
  2. +1 −1 railties/lib/rails/test_unit/railtie.rb
View
@@ -1,3 +1,8 @@
+* Do not set the Rails environment to test by default when using test_unit Railtie.
+
+ *Konstantin Shabanov*
+
+
## Rails 4.0.4 (March 14, 2014) ##
* Added Thor-action for creation of migrations.
@@ -1,4 +1,4 @@
-if defined?(Rake.application) && Rake.application.top_level_tasks.grep(/^(default$|test(:|$))/).any?
+if defined?(Rake.application) && Rake.application.top_level_tasks.grep(/^test(?::|$)/).any?
ENV['RAILS_ENV'] ||= 'test'
end

0 comments on commit a263d0b

Please sign in to comment.