aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
Diffstat (limited to 'railties')
-rw-r--r--railties/test/commands/console_test.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/railties/test/commands/console_test.rb b/railties/test/commands/console_test.rb
index f765143f1d..4aea3e980f 100644
--- a/railties/test/commands/console_test.rb
+++ b/railties/test/commands/console_test.rb
@@ -58,9 +58,12 @@ class Rails::ConsoleTest < ActiveSupport::TestCase
end
def test_start_with_debugger
- rails_console = Rails::Console.new(app, parse_arguments(["--debugger"]))
- rails_console.expects(:require_debugger).returns(nil)
+ stubbed_console = Class.new(Rails::Console) do
+ def require_debugger
+ end
+ end
+ rails_console = stubbed_console.new(app, parse_arguments(["--debugger"]))
silence_stream(STDOUT) { rails_console.start }
end
end