diff --git a/test/lib/maintenance_tasks/cli_test.rb b/test/lib/maintenance_tasks/cli_test.rb index 5f9b56a0..fc8c1199 100644 --- a/test/lib/maintenance_tasks/cli_test.rb +++ b/test/lib/maintenance_tasks/cli_test.rb @@ -86,17 +86,14 @@ class CLITest < ActiveSupport::TestCase end test "`list` loads all tasks and displays them" do - Task - .expects(:load_all) - .at_least_once - .returns([stub(name: "Task1"), stub(name: "Task2")]) + Task.expects(:load_all).returns([stub(name: "Task1"), stub(name: "Task2")]) expected_output = <<~OUTPUT Task1 Task2 OUTPUT - assert_output(Regexp.union(expected_output)) do + assert_output(expected_output) do CLI.start(["list"]) end end