File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -4,11 +4,11 @@ Feature: channel spec
4
4
Channel specs are marked by `:type => :channel` or if you have set
5
5
`config.infer_spec_type_from_file_location!` by placing them in `spec/channels`.
6
6
7
- A channel spec is a thin wrapper for an ActionCable::Channel::TestCase, and includes all
7
+ A channel spec is a thin wrapper for an ` ActionCable::Channel::TestCase` , and includes all
8
8
of the behavior and assertions that it provides, in addition to RSpec's own
9
9
behavior and expectations.
10
10
11
- It also includes helpers from ActionCable::Connection::TestCase to make it possible to
11
+ It also includes helpers from ` ActionCable::Connection::TestCase` to make it possible to
12
12
test connection behavior.
13
13
14
14
Background :
Original file line number Diff line number Diff line change @@ -135,19 +135,19 @@ def filter_rails_from_backtrace!
135
135
end
136
136
end
137
137
138
- if defined? ( ActionMailer )
138
+ if RSpec :: Rails :: FeatureCheck . has_action_mailer?
139
139
config . include RSpec ::Rails ::MailerExampleGroup , :type => :mailer
140
140
end
141
141
142
- if defined? ( ActiveJob )
142
+ if RSpec :: Rails :: FeatureCheck . has_active_job?
143
143
config . include RSpec ::Rails ::JobExampleGroup , :type => :job
144
144
end
145
145
146
- if defined? ( ActionCable ) && ::Rails ::VERSION :: STRING > '6'
146
+ if RSpec ::Rails ::FeatureCheck . has_action_cable_testing?
147
147
config . include RSpec ::Rails ::ChannelExampleGroup , :type => :channel
148
148
end
149
149
150
- if defined? ( ActionMailbox )
150
+ if RSpec :: Rails :: FeatureCheck . has_action_mailbox?
151
151
config . include RSpec ::Rails ::MailboxExampleGroup , :type => :mailbox
152
152
end
153
153
end
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ module ClassMethods
15
15
end
16
16
end
17
17
18
- if ::Rails ::VERSION :: MAJOR >= 6
18
+ if RSpec ::Rails ::FeatureCheck . has_action_cable_testing?
19
19
module RSpec
20
20
module Rails
21
21
# @api public
You can’t perform that action at this time.
0 commit comments