Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update MiniTest -> Minitest #489

Merged
merged 1 commit into from
Jul 27, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions test/broadcastable/test_helper_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -122,19 +122,19 @@ class Turbo::Broadcastable::TestHelper::AssertTurboStreamBroadcastsTest < Active
end

test "#assert_turbo_stream_broadcasts fails when no broadcasts happened on a stream name" do
assert_raises MiniTest::Assertion do
assert_raises Minitest::Assertion do
assert_turbo_stream_broadcasts "messages"
end
end

test "#assert_turbo_stream_broadcasts with a count: optional fails when no broadcasts happened on a stream name" do
singular_failure = assert_raises MiniTest::Assertion do
singular_failure = assert_raises Minitest::Assertion do
assert_turbo_stream_broadcasts "messages", count: 1
end

assert_includes singular_failure.message, %(1 Turbo Stream broadcast on "messages")

plural_failure = assert_raises MiniTest::Assertion do
plural_failure = assert_raises Minitest::Assertion do
assert_turbo_stream_broadcasts "messages", count: 2
end

Expand Down Expand Up @@ -187,7 +187,7 @@ class Turbo::Broadcastable::TestHelper::AssertTurboStreamBroadcastsTest < Active
end

test "#assert_turbo_stream_broadcasts fails when no broadcasts happened on a stream name from a block" do
assert_raises MiniTest::Assertion do
assert_raises Minitest::Assertion do
assert_turbo_stream_broadcasts "messages" do
# no-op
end
Expand Down Expand Up @@ -225,7 +225,7 @@ class Turbo::Broadcastable::TestHelper::AssertNoTurboStreamBroadcastsTest < Acti
test "#assert_no_turbo_stream_broadcasts fails when when a broadcast happened on a stream name" do
message = Message.new(id: 1)

assert_raises MiniTest::Assertion do
assert_raises Minitest::Assertion do
message.broadcast_remove_to "messages"

assert_no_turbo_stream_broadcasts "messages"
Expand All @@ -235,7 +235,7 @@ class Turbo::Broadcastable::TestHelper::AssertNoTurboStreamBroadcastsTest < Acti
test "#assert_no_turbo_stream_broadcasts fails when when a broadcast happened on a stream name from a block" do
message = Message.new(id: 1)

assert_raises MiniTest::Assertion do
assert_raises Minitest::Assertion do
assert_no_turbo_stream_broadcasts "messages" do
message.broadcast_remove_to "messages"
end
Expand All @@ -245,7 +245,7 @@ class Turbo::Broadcastable::TestHelper::AssertNoTurboStreamBroadcastsTest < Acti
test "#assert_no_turbo_stream_broadcasts fails when when a broadcast happened on a stream object" do
message = Message.new(id: 1)

assert_raises MiniTest::Assertion do
assert_raises Minitest::Assertion do
message.broadcast_remove

assert_no_turbo_stream_broadcasts message
Expand All @@ -255,7 +255,7 @@ class Turbo::Broadcastable::TestHelper::AssertNoTurboStreamBroadcastsTest < Acti
test "#assert_no_turbo_stream_broadcasts fails when when a broadcast happened on a stream object from a block" do
message = Message.new(id: 1)

assert_raises MiniTest::Assertion do
assert_raises Minitest::Assertion do
assert_no_turbo_stream_broadcasts message do
message.broadcast_remove
end
Expand Down