Much like the problem [1] with MiniTest.
[1]
http://floehopper.lighthouseapp....
$:.unshift File.expand_path(File.join(File.dirname(__FILE__), "lib"))
require 'bacon'
require 'mocha'
Bacon.extend(Bacon::TestUnitOutput)
Bacon.summary_on_exit
describe 'TempTest' do
should 'test_me' do
mockee = mock()
mockee.expects(:blah)
end
end
E
Mocha::ExpectationError: not all expectations were satisfied
unsatisfied expectations:
- expected exactly once, not yet invoked: #<Mock:0x18cba8>.blah(any_parameters)
at top level in temp_test.rb at line 12
at top level in temp_test.rb at line 10
at top level in temp_test.rb at line 8
1 tests, 1 assertions, 0 failures, 1 errors
Should be :-
1 tests, 1 assertions, 1 failures, 0 errors
Suggested solution :-
- Correct and add assertions to BaconTest as per MiniTestTest.
This should give at least 4 failing tests.
- Make users explicitly require relevant version of Mocha e.g.
require 'mocha/integration/bacon'
- Introduce the concept of an ExpectationErrorTranslator or
similar. This will raise the appropriate exception depending on
which test framework is being integrated. It may have to be set on
the Mockery or similar.
- We should be able to apply this to Test::Unit and MiniTest to
simplify the monkey-patching of e.g. TestCase#run
- See Mocha::Integration::MiniTest.translate for the beginnings
of this idea.