Module: TurboRspec
- Defined in:
- lib/turbo_rspec.rb,
lib/turbo_rspec/helpers.rb,
lib/turbo_rspec/version.rb,
lib/turbo_rspec/matchers.rb,
lib/turbo_rspec/assertions.rb,
lib/turbo_rspec/configuration.rb,
lib/turbo_rspec/capybara/matchers.rb,
lib/turbo_rspec/matchers/have_turbo_frame.rb,
lib/turbo_rspec/matchers/have_turbo_stream.rb,
lib/turbo_rspec/matchers/have_turbo_streams.rb,
lib/turbo_rspec/capybara/matchers/have_turbo_frame.rb,
lib/turbo_rspec/capybara/matchers/have_turbo_stream_tag.rb,
lib/turbo_rspec/matchers/have_broadcasted_turbo_stream_to.rb
Defined Under Namespace
Modules: Assertions, Capybara, Helpers, Matchers
Classes: Configuration, Error
Constant Summary
collapse
- VERSION =
"0.6.0"
Class Method Summary
collapse
Class Method Details
.configuration ⇒ Object
19
20
21
|
# File 'lib/turbo_rspec.rb', line 19
def configuration
@configuration ||= Configuration.new
end
|
15
16
17
|
# File 'lib/turbo_rspec.rb', line 15
def configure
yield configuration
end
|
.install_rspec_integration(config) ⇒ Object
27
28
29
30
31
32
33
34
35
36
37
|
# File 'lib/turbo_rspec.rb', line 27
def install_rspec_integration(config)
return unless configuration.auto_include && Gem.loaded_specs.key?("turbo-rails")
config.include Matchers, type: :request
config.include Matchers, type: :controller
config.include Helpers, type: :request
config.include Helpers, type: :controller
if Gem.loaded_specs.key?("capybara")
config.include Capybara::Matchers, type: :system
config.include Capybara::Matchers, type: :feature
end
end
|
.reset_configuration! ⇒ Object
23
24
25
|
# File 'lib/turbo_rspec.rb', line 23
def reset_configuration!
@configuration = Configuration.new
end
|