diff options
author | Arthur Neves <arthurnn@gmail.com> | 2015-03-19 10:16:05 -0400 |
---|---|---|
committer | Arthur Neves <arthurnn@gmail.com> | 2015-03-19 10:16:05 -0400 |
commit | 45786be516e13d55a1fca9a4abaddd5781209103 (patch) | |
tree | c6b3ef4e56e9e11758a005da32fced68f4e5c2f4 /railties/lib | |
parent | 9959e9525b9bd3324288c87f1c791cbb488c36c8 (diff) | |
parent | a9eb12393fa1245620533a58ed36f651558ecae8 (diff) | |
download | rails-45786be516e13d55a1fca9a4abaddd5781209103.tar.gz rails-45786be516e13d55a1fca9a4abaddd5781209103.tar.bz2 rails-45786be516e13d55a1fca9a4abaddd5781209103.zip |
Merge branch 'bin_test_runner'. #19216
3 commits were missing when we merged the PR, probably they were lost
when that branch was rebased against latest master.
This merge, contains those 3 commits.
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/rails/generators/rails/app/templates/Gemfile | 4 | ||||
-rw-r--r-- | railties/lib/rails/test_unit/runner.rb | 2 | ||||
-rw-r--r-- | railties/lib/rails/test_unit/testing.rake | 4 |
3 files changed, 3 insertions, 7 deletions
diff --git a/railties/lib/rails/generators/rails/app/templates/Gemfile b/railties/lib/rails/generators/rails/app/templates/Gemfile index 82a0315379..c11bb58bfa 100644 --- a/railties/lib/rails/generators/rails/app/templates/Gemfile +++ b/railties/lib/rails/generators/rails/app/templates/Gemfile @@ -36,10 +36,6 @@ group :development, :test do # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring gem 'spring' <% end -%> - - # Adds `Method#source` and `Method#comment` to get the source code of a - # method from the console - gem 'method_source' <% end -%> end <% if RUBY_PLATFORM.match(/bccwin|cygwin|emx|mingw|mswin|wince|java/) -%> diff --git a/railties/lib/rails/test_unit/runner.rb b/railties/lib/rails/test_unit/runner.rb index aec4707947..6700d90a33 100644 --- a/railties/lib/rails/test_unit/runner.rb +++ b/railties/lib/rails/test_unit/runner.rb @@ -129,7 +129,7 @@ module Rails location = method.source_location start_line = location.last end_line = method.source.split("\n").size + start_line - 1 - methods_map << [location.first, test_method, start_line, end_line] + methods_map << [File.expand_path(location.first), test_method, start_line, end_line] end end methods_map diff --git a/railties/lib/rails/test_unit/testing.rake b/railties/lib/rails/test_unit/testing.rake index f3a43a12db..0f26621b59 100644 --- a/railties/lib/rails/test_unit/testing.rake +++ b/railties/lib/rails/test_unit/testing.rake @@ -5,8 +5,8 @@ task default: :test desc "Runs all tests in test folder" task :test do $: << "test" - ARGV.shift if ARGV[0] == "test" - Rails::TestRunner.run(ARGV) + args = ARGV[0] == "test" ? ARGV[1..-1] : [] + Rails::TestRunner.run(args) end namespace :test do |