Skip to content

Commit

Permalink
Simplify test
Browse files Browse the repository at this point in the history
  • Loading branch information
davidstosik committed Nov 1, 2023
1 parent eeb6704 commit 7ed7afd
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions test/lib/maintenance_tasks/cli_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7ed7afd

Please sign in to comment.