Skip to content

Addressing Jon code-review on 4-0-dev #2131

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

Merged
merged 2 commits into from
May 20, 2019
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions features/channel_specs/channel_spec.feature
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ Feature: channel spec
Channel specs are marked by `:type => :channel` or if you have set
`config.infer_spec_type_from_file_location!` by placing them in `spec/channels`.

A channel spec is a thin wrapper for an ActionCable::Channel::TestCase, and includes all
A channel spec is a thin wrapper for an `ActionCable::Channel::TestCase`, and includes all
of the behavior and assertions that it provides, in addition to RSpec's own
behavior and expectations.

It also includes helpers from ActionCable::Connection::TestCase to make it possible to
It also includes helpers from `ActionCable::Connection::TestCase` to make it possible to
test connection behavior.

Background:
Expand Down
8 changes: 4 additions & 4 deletions lib/rspec/rails/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -135,19 +135,19 @@ def filter_rails_from_backtrace!
end
end

if defined?(ActionMailer)
if RSpec::Rails::FeatureCheck.has_action_mailer?
config.include RSpec::Rails::MailerExampleGroup, :type => :mailer
end

if defined?(ActiveJob)
if RSpec::Rails::FeatureCheck.has_active_job?
config.include RSpec::Rails::JobExampleGroup, :type => :job
end

if defined?(ActionCable) && ::Rails::VERSION::STRING > '6'
if RSpec::Rails::FeatureCheck.has_action_cable_testing?
config.include RSpec::Rails::ChannelExampleGroup, :type => :channel
end

if defined?(ActionMailbox)
if RSpec::Rails::FeatureCheck.has_action_mailbox?
config.include RSpec::Rails::MailboxExampleGroup, :type => :mailbox
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/rspec/rails/example/channel_example_group.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ module ClassMethods
end
end

if ::Rails::VERSION::MAJOR >= 6
if RSpec::Rails::FeatureCheck.has_action_cable_testing?
module RSpec
module Rails
# @api public
Expand Down