aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/test_unit
diff options
context:
space:
mode:
authorYves Senn <yves.senn@gmail.com>2015-01-29 15:03:08 +0100
committerYves Senn <yves.senn@gmail.com>2015-03-18 09:52:18 +0100
commit090c83672f333d6a4d87752ca1f980bfb6be6849 (patch)
tree08824ed6b23002a0b276872ac688ac4c94d8af95 /railties/test/test_unit
parentf4ea8dda1b150d8abc2f41a214e15ae81ed5f9b5 (diff)
downloadrails-090c83672f333d6a4d87752ca1f980bfb6be6849.tar.gz
rails-090c83672f333d6a4d87752ca1f980bfb6be6849.tar.bz2
rails-090c83672f333d6a4d87752ca1f980bfb6be6849.zip
`-e` / `--environment` for the test runner.
Diffstat (limited to 'railties/test/test_unit')
-rw-r--r--railties/test/test_unit/runner_test.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/railties/test/test_unit/runner_test.rb b/railties/test/test_unit/runner_test.rb
index be226e3aa5..cd0c66a5f7 100644
--- a/railties/test/test_unit/runner_test.rb
+++ b/railties/test/test_unit/runner_test.rb
@@ -19,6 +19,16 @@ class TestUnitTestRunnerTest < ActiveSupport::TestCase
assert options[:backtrace]
end
+ test "tests run in the test environment by default" do
+ options = @options.parse([])
+ assert_equal "test", options[:environment]
+ end
+
+ test "can run in a specific environment" do
+ options = @options.parse(["-e development"])
+ assert_equal "development", options[:environment]
+ end
+
test "parse the filename and line" do
options = @options.parse(["foobar.rb:20"])
assert_equal File.expand_path("foobar.rb"), options[:filename]
@@ -52,4 +62,8 @@ class TestUnitTestRunnerTest < ActiveSupport::TestCase
assert_nil options[:filename]
assert_nil options[:line]
end
+
+ test "run multiple files" do
+ skip "needs implementation"
+ end
end