#41 ✓resolved
James Mead

MiniTest integration is counting ExpectationErrors as errors not failures

Reported by James Mead | 2009-03-05 14:49:56 UTC

For example with Ruby v1.8.6 and MiniTest gem v1.3.1 :-


gem 'minitest'
require 'minitest/autorun'
require 'mocha'

class TempTest < MiniTest::Unit::TestCase
  
  def test_me
    mockee = mock()
    mockee.expects(:blah)
  end
  
end

E 
Finished in 0.001008 seconds.

  1) Error:
test_me(TempTest):
Mocha::ExpectationError: not all expectations were satisfied
unsatisfied expectations:
- expected exactly once, not yet invoked: #<Mock:0x617844>.blah(any_parameters)

method test_me in temp_test.rb at line 9
method run_test_suites in unit.rb at line 413
method each in unit.rb at line 407
method run_test_suites in unit.rb at line 407
method each in unit.rb at line 406
method run_test_suites in unit.rb at line 406
method run in unit.rb at line 386
method autorun in unit.rb at line 327
at top level in temp_test.rb at line 7

1 tests, 1 assertions, 0 failures, 1 errors, 0 skips

Should be :-


1 tests, 1 assertions, 1 failures, 0 errors, 0 skips

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

A mocking & stubbing library for Ruby.

* GitHub repository
* Documentation
* Mailing List

People watching this ticket

Tags

Referenced by

Pages