Module: CaptainHoog::Test::RSpec::TestCase
- Defined in:
- lib/captain_hoog/test/rspec.rb
Instance Attribute Summary collapse
-
#plugin ⇒ Object
readonly
Returns the value of attribute plugin.
Instance Method Summary collapse
Instance Attribute Details
#plugin ⇒ Object (readonly)
Returns the value of attribute plugin.
6 7 8 |
# File 'lib/captain_hoog/test/rspec.rb', line 6 def plugin @plugin end |
Instance Method Details
#with_plugin(plugin_name, config: nil, silence: false) ⇒ Object
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/captain_hoog/test/rspec.rb', line 8 def with_plugin(plugin_name, config: nil, silence: false) before do cfg = config ? self.send(config) : {} cfg.merge!(env: { suppress_headline: silence }) if silence build_sandbox(plugin_name, cfg) end context "with plugin #{plugin_name}" do yield if block_given? end end |