Class: Synthesis::MochaAdapter
- Defined in:
- lib/synthesis/adapter/mocha.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
14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/synthesis/adapter/mocha.rb', line 14 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 12 |
# File 'lib/synthesis/adapter/mocha.rb', line 9 def run Test::Unit.run = true # Yes means no... fail_unless { Test::Unit::AutoRunner.run(false, nil, []) } end |