Class: Synthesis::ExpectationsAdapter
- Defined in:
- lib/synthesis/adapter/expectations.rb
Instance Method Summary collapse
Methods inherited from Adapter
#fail_unless, #ignore_instances_of, inherited, #initialize, load
Methods included from Logging
Constructor Details
This class inherits a constructor from Synthesis::Adapter
Instance Method Details
#collect_expectations ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/synthesis/adapter/expectations.rb', line 13 def collect_expectations ignore_instances_of Class::AnyInstance Object.extend(ExpectationRecorder) Object.record_expectations_on(:expects) Mocha::Expectation.extend(ExpectationInterceptor) Mocha::Expectation.intercept_test_subject_on(:invoke) Mocha::Expectation.intercept_expected_arguments_on(:with) Mocha::Expectation.intercept_expected_return_values_on(:returns) Mocha::Expectation.intercept_expected_return_values_on(:raises) Mocha::Expectation.remove_expectation_on(:never) end |
#run ⇒ Object
9 10 11 |
# File 'lib/synthesis/adapter/expectations.rb', line 9 def run fail_unless { Expectations::SuiteRunner.instance.suite.execute } end |