Skip to content

Commit

Permalink
test endpoint with assert_fail?.
Browse files Browse the repository at this point in the history
  • Loading branch information
apotonick committed Dec 19, 2024
1 parent 3cd4e93 commit bd6c5a3
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/assertion_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -531,6 +531,18 @@ def self.__?(*args, &block)
|-- \e[32mvalidate\e[0m
|-- \e[32mmodel\e[0m
`-- End.success
)
end

it "{#assert_fail?}" do
out, _ = capture_io do
ctx = assert_fail? Create, {params: {}}, [:title]
end

assert_equal out, %(AssertionActivityTest::Create
|-- \e[32mStart.default\e[0m
|-- \e[33mvalidate\e[0m
`-- End.failure
)
end
end
Expand Down

0 comments on commit bd6c5a3

Please sign in to comment.