Class: Pact::Provider::PactSpecRunner
- Inherits:
-
Object
- Object
- Pact::Provider::PactSpecRunner
- Includes:
- RSpec::ClassMethods
- Defined in:
- lib/pact/provider/pact_spec_runner.rb
Constant Summary collapse
- SUPPORT_FILE_DEPRECATION_MESSAGE =
"The :support_file option is deprecated. " + "The preferred way to specify a support file is to create a pact_helper.rb in one of the following paths: " + Pact::Provider::PactHelperLocater::PACT_HELPER_FILE_PATTERNS.join(", ") + ". If you cannot do this, you may use the :pact_helper option in place of the :support_file option."
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#output ⇒ Object
readonly
Returns the value of attribute output.
-
#spec_definitions ⇒ Object
readonly
Returns the value of attribute spec_definitions.
Instance Method Summary collapse
-
#initialize(spec_definitions, options = {}) ⇒ PactSpecRunner
constructor
A new instance of PactSpecRunner.
- #run ⇒ Object
Methods included from RSpec::ClassMethods
#honour_consumer_contract, #honour_pactfile
Constructor Details
#initialize(spec_definitions, options = {}) ⇒ PactSpecRunner
Returns a new instance of PactSpecRunner.
25 26 27 28 29 |
# File 'lib/pact/provider/pact_spec_runner.rb', line 25 def initialize spec_definitions, = {} @spec_definitions = spec_definitions @options = @results = nil end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
22 23 24 |
# File 'lib/pact/provider/pact_spec_runner.rb', line 22 def @options end |
#output ⇒ Object (readonly)
Returns the value of attribute output.
23 24 25 |
# File 'lib/pact/provider/pact_spec_runner.rb', line 23 def output @output end |
#spec_definitions ⇒ Object (readonly)
Returns the value of attribute spec_definitions.
21 22 23 |
# File 'lib/pact/provider/pact_spec_runner.rb', line 21 def spec_definitions @spec_definitions end |
Instance Method Details
#run ⇒ Object
31 32 33 34 35 36 37 38 39 |
# File 'lib/pact/provider/pact_spec_runner.rb', line 31 def run begin configure_rspec initialize_specs run_specs ensure ::RSpec.reset end end |