Permalink
Browse files

add integration test for shorthand rake tests

  • Loading branch information...
1 parent 2e0e5bb commit cc0c392c77548236207f5973269409d676ae7008 @tenderlove tenderlove committed Apr 6, 2013
Showing with 7 additions and 0 deletions.
  1. +7 −0 railties/test/application/test_runner_test.rb
@@ -195,6 +195,13 @@ def test_load_fixtures_when_running_test_suites
end
end
+ def test_run_with_model
+ create_model_with_fixture
+ create_fixture_test 'models', 'user'
+ assert_match "3 users", run_task(["test models/user"])
+ assert_match "3 users", run_task(["test app/models/user.rb"])
+ end
+
def test_run_different_environment_using_env_var
app_file 'test/unit/env_test.rb', <<-RUBY
require 'test_helper'

1 comment on commit cc0c392

Contributor

fesplugas commented on cc0c392 Apr 8, 2013

Nice addon, now it would be awesome to be able to run a single test on the file. Something like rspec does:

rake test models/user.rb 85
Please sign in to comment.