diff options
author | Lachlan Sylvester <lachlan.sylvester@publicisfrontfoot.com.au> | 2018-08-06 15:40:49 +1000 |
---|---|---|
committer | Lachlan Sylvester <lachlan.sylvester@publicisfrontfoot.com.au> | 2018-08-06 15:40:49 +1000 |
commit | 67c58f4884d9ec3849c372b725387d29ebdc16ac (patch) | |
tree | 2f0df5ca9ef15ce1a605b12adbaedc19b4b572e8 | |
parent | 5f939a770d9c317b62fb3c63cdac5bac12c94a8f (diff) | |
download | rails-67c58f4884d9ec3849c372b725387d29ebdc16ac.tar.gz rails-67c58f4884d9ec3849c372b725387d29ebdc16ac.tar.bz2 rails-67c58f4884d9ec3849c372b725387d29ebdc16ac.zip |
Filter backtrace in test to ensure irb counts as user code
-rw-r--r-- | railties/test/backtrace_cleaner_test.rb | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/railties/test/backtrace_cleaner_test.rb b/railties/test/backtrace_cleaner_test.rb index 70917ba20b..4546e8f559 100644 --- a/railties/test/backtrace_cleaner_test.rb +++ b/railties/test/backtrace_cleaner_test.rb @@ -25,10 +25,11 @@ class BacktraceCleanerTest < ActiveSupport::TestCase end test "should consider traces from irb lines as User code" do - backtrace = [ "from (irb):1", - "from /Path/to/rails/railties/lib/rails/commands/console.rb:77:in `start'", - "from bin/rails:4:in `<main>'" ] - result = @cleaner.clean(backtrace, :all) - assert_equal "from (irb):1", result[0] + backtrace = [ "(irb):1", + "/Path/to/rails/railties/lib/rails/commands/console.rb:77:in `start'", + "bin/rails:4:in `<main>'" ] + result = @cleaner.clean(backtrace) + assert_equal "(irb):1", result[0] + assert_equal 1, result.length end end |