Module: TestConstruct::RSpecIntegration
- Defined in:
- lib/test_construct/rspec_integration.rb
Class Method Summary collapse
- .test_construct_default_options ⇒ Object
- .test_construct_enabled?(example) ⇒ Boolean
-
.test_construct_options(example) ⇒ Object
the :test_construct metadata key can be either: - true (for all defaults) - a Hash of options - false/missing (disable the construct for this test).
Class Method Details
.test_construct_default_options ⇒ Object
25 26 27 28 29 30 31 |
# File 'lib/test_construct/rspec_integration.rb', line 25 def { base_dir: TestConstruct.tmpdir, chdir: true, keep_on_error: true, } end |
.test_construct_enabled?(example) ⇒ Boolean
21 22 23 |
# File 'lib/test_construct/rspec_integration.rb', line 21 def test_construct_enabled?(example) !!example.[:test_construct] end |
.test_construct_options(example) ⇒ Object
the :test_construct metadata key can be either:
-
true (for all defaults)
-
a Hash of options
-
false/missing (disable the construct for this test)
11 12 13 14 15 16 17 18 19 |
# File 'lib/test_construct/rspec_integration.rb', line 11 def (example) = [:name] = example.full_description = example.[:test_construct] if .is_a?(Hash) .merge!() end end |