diff options
Diffstat (limited to 'railties/lib/rails')
-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 |