-
Notifications
You must be signed in to change notification settings - Fork 328
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
Include broadcastable assertions automatically in ActiveSupport::TestCase #565
Include broadcastable assertions automatically in ActiveSupport::TestCase #565
Conversation
I could also see |
I don't remember specifically, but in retrospect, I think the transitive Since that isn't included globally, it seemed appropriate to follow suit with these helpers too. |
Thanks @swanson I think we can include this change as part of a minor release, as it won't cause any harm to people that were already including the module themselves. module Greetings
def greet
"Hello!"
end
end
class Person
include Greetings
include Greetings # Including the module a second time
end
person = Person.new
puts person.greet # Outputs: "Hello!" |
@swanson @afcapel Hi, we are using With Rails 7.1 upgrade we had to start to including
Is there a way to fix it without adding the complete infratructure for action cable into our app? Thank you. |
Closes [hotwired#573][] Related to [hotwired#565][] Re-structure the automatic inclusion of the `Turbo::Broadcastable::TestHelper` module so that it's only automatically loaded and installed when Action Cable is available to the runtime. [hotwired#573]: hotwired#573 [hotwired#565]: hotwired#565 (comment)
Closes [hotwired#573][] Related to [hotwired#565][] Re-structure the automatic inclusion of the `Turbo::Broadcastable::TestHelper` module so that it's only automatically loaded and installed when Action Cable is available to the runtime. [hotwired#573]: hotwired#573 [hotwired#565]: hotwired#565 (comment)
Closes [hotwired#573][] Related to [hotwired#565][] Re-structure the automatic inclusion of the `Turbo::Broadcastable::TestHelper` module so that it's only automatically loaded and installed when Action Cable is available to the runtime. [hotwired#573]: hotwired#573 [hotwired#565]: hotwired#565 (comment)
Closes [#573][] Related to [#565][] Re-structure the automatic inclusion of the `Turbo::Broadcastable::TestHelper` module so that it's only automatically loaded and installed when Action Cable is available to the runtime. [#573]: hotwired/turbo-rails#573 [#565]: hotwired/turbo-rails#565 (comment)
There is a note in the Campfire codebase
test_helper
:And I noticed I had the same patch in my own codebase:
In #466 it explicitly mentioned the
Broadcastable::TestHelpers
are "not automatically included" -- but I'm not sure why. @seanpdoyle any insights?