Module: SimpleCrud::RSpec
- Defined in:
- lib/simple_crud/rspec.rb,
lib/simple_crud/rspec/config.rb,
lib/simple_crud/rspec/helpers.rb
Overview
Test helpers: SimpleCrud::RSpec.configure exposes the shared examples' configuration for apps on a different stack than the gem's.
Defined Under Namespace
Modules: Helpers Classes: Config
Class Method Summary collapse
- .configure {|Config.instance| ... } ⇒ Object
-
.install! ⇒ Object
Opt-in wiring: call from your spec support after requiring this file.
Class Method Details
.configure {|Config.instance| ... } ⇒ Object
7 8 9 |
# File 'lib/simple_crud/rspec/config.rb', line 7 def self.configure yield Config.instance end |
.install! ⇒ Object
Opt-in wiring: call from your spec support after requiring this file. extend wires definition-time helpers (check_html...), include runtime ones (model...).
37 38 39 40 41 42 43 |
# File 'lib/simple_crud/rspec.rb', line 37 def self.install! ::RSpec.configure do |config| config.extend Helpers config.include Helpers config.include Response::JSONParser, type: :controller end end |