#43 ✓ resolved
James Mead

Some Bacon integration tests fails in Ruby 1.9.1

Reported by James Mead | March 5th, 2009 @ 04:04 PM


  1) Failure:
test_should_fail_mocha_test_due_to_unfulfilled_expectation(BaconTest)
    [/Users/jamesmead/Code/mocha/test/acceptance/bacon_test.rb:102:in `assert_not_all_expectation_were_satisfied'
     /Users/jamesmead/Code/mocha/test/acceptance/bacon_test.rb:52:in `test_should_fail_mocha_test_due_to_unfulfilled_expectation'
     /Users/jamesmead/Code/mocha/lib/mocha/integration/test_unit/ruby_version_186_and_above.rb:19:in `run']:
Bacon output:

NameError: uninitialized constant Bacon::Context::AssertionCounter
	/Users/jamesmead/Code/mocha/lib/mocha/integration/bacon/version_11_and_above.rb:17:in `block in it': Bacon specs using Mocha - should fail when not all expectations were fulfilled
	/Users/jamesmead/Code/mocha/test/acceptance/bacon_spec.rb:12:in `handle_requirement'
	/Users/jamesmead/Code/mocha/lib/mocha/integration/bacon/version_11_and_above.rb:16:in `it'
	/Users/jamesmead/Code/mocha/test/acceptance/bacon_spec.rb:34:in `block in <top (required)>'
	/Users/jamesmead/Code/mocha/test/acceptance/bacon_spec.rb:8:in `handle_specification'
	/Users/jamesmead/Code/mocha/test/acceptance/bacon_spec.rb:27:in `<top (required)>'

1 tests, 0 assertions, 0 failures, 1 errors
.
<"\nNameError: uninitialized constant Bacon::Context::AssertionCounter\n\t/Users/jamesmead/Code/mocha/lib/mocha/integration/bacon/version_11_and_above.rb:17:in `block in it': Bacon specs using Mocha - should fail when not all expectations were fulfilled\n\t/Users/jamesmead/Code/mocha/test/acceptance/bacon_spec.rb:12:in `handle_requirement'\n\t/Users/jamesmead/Code/mocha/lib/mocha/integration/bacon/version_11_and_above.rb:16:in `it'\n\t/Users/jamesmead/Code/mocha/test/acceptance/bacon_spec.rb:34:in `block in <top (required)>'\n\t/Users/jamesmead/Code/mocha/test/acceptance/bacon_spec.rb:8:in `handle_specification'\n\t/Users/jamesmead/Code/mocha/test/acceptance/bacon_spec.rb:27:in `<top (required)>'\n\n1 tests, 0 assertions, 0 failures, 1 errors\n"> expected to be =~
</not all expectations were satisfied/>.

  2) Failure:
test_should_fail_mocha_test_with_non_matching_parameter(BaconTest)
    [/Users/jamesmead/Code/mocha/test/acceptance/bacon_test.rb:98:in `assert_unexpected_invocation'
     /Users/jamesmead/Code/mocha/test/acceptance/bacon_test.rb:92:in `test_should_fail_mocha_test_with_non_matching_parameter'
     /Users/jamesmead/Code/mocha/lib/mocha/integration/test_unit/ruby_version_186_and_above.rb:19:in `run']:
Bacon output:

NameError: uninitialized constant Bacon::Context::AssertionCounter
	/Users/jamesmead/Code/mocha/lib/mocha/integration/bacon/version_11_and_above.rb:17:in `block in it': Bacon specs using Mocha - should fail when they receive unexpected parameters
	/Users/jamesmead/Code/mocha/test/acceptance/bacon_spec.rb:12:in `handle_requirement'
	/Users/jamesmead/Code/mocha/lib/mocha/integration/bacon/version_11_and_above.rb:16:in `it'
	/Users/jamesmead/Code/mocha/test/acceptance/bacon_spec.rb:50:in `block in <top (required)>'
	/Users/jamesmead/Code/mocha/test/acceptance/bacon_spec.rb:8:in `handle_specification'
	/Users/jamesmead/Code/mocha/test/acceptance/bacon_spec.rb:27:in `<top (required)>'

1 tests, 0 assertions, 0 failures, 1 errors
.
<"\nNameError: uninitialized constant Bacon::Context::AssertionCounter\n\t/Users/jamesmead/Code/mocha/lib/mocha/integration/bacon/version_11_and_above.rb:17:in `block in it': Bacon specs using Mocha - should fail when they receive unexpected parameters\n\t/Users/jamesmead/Code/mocha/test/acceptance/bacon_spec.rb:12:in `handle_requirement'\n\t/Users/jamesmead/Code/mocha/lib/mocha/integration/bacon/version_11_and_above.rb:16:in `it'\n\t/Users/jamesmead/Code/mocha/test/acceptance/bacon_spec.rb:50:in `block in <top (required)>'\n\t/Users/jamesmead/Code/mocha/test/acceptance/bacon_spec.rb:8:in `handle_specification'\n\t/Users/jamesmead/Code/mocha/test/acceptance/bacon_spec.rb:27:in `<top (required)>'\n\n1 tests, 0 assertions, 0 failures, 1 errors\n"> expected to be =~
</unexpected invocation/>.

  3) Failure:
test_should_fail_stubba_test_due_to_unfulfilled_expectation(BaconTest)
    [/Users/jamesmead/Code/mocha/test/acceptance/bacon_test.rb:102:in `assert_not_all_expectation_were_satisfied'
     /Users/jamesmead/Code/mocha/test/acceptance/bacon_test.rb:77:in `test_should_fail_stubba_test_due_to_unfulfilled_expectation'
     /Users/jamesmead/Code/mocha/lib/mocha/integration/test_unit/ruby_version_186_and_above.rb:19:in `run']:
Bacon output:

NameError: uninitialized constant Bacon::Context::AssertionCounter
	/Users/jamesmead/Code/mocha/lib/mocha/integration/bacon/version_11_and_above.rb:17:in `block in it': Bacon specs using Mocha - should fail when not all Stubba expectations were fulfilled
	/Users/jamesmead/Code/mocha/test/acceptance/bacon_spec.rb:12:in `handle_requirement'
	/Users/jamesmead/Code/mocha/lib/mocha/integration/bacon/version_11_and_above.rb:16:in `it'
	/Users/jamesmead/Code/mocha/test/acceptance/bacon_spec.rb:62:in `block in <top (required)>'
	/Users/jamesmead/Code/mocha/test/acceptance/bacon_spec.rb:8:in `handle_specification'
	/Users/jamesmead/Code/mocha/test/acceptance/bacon_spec.rb:27:in `<top (required)>'

1 tests, 0 assertions, 0 failures, 1 errors
.
<"\nNameError: uninitialized constant Bacon::Context::AssertionCounter\n\t/Users/jamesmead/Code/mocha/lib/mocha/integration/bacon/version_11_and_above.rb:17:in `block in it': Bacon specs using Mocha - should fail when not all Stubba expectations were fulfilled\n\t/Users/jamesmead/Code/mocha/test/acceptance/bacon_spec.rb:12:in `handle_requirement'\n\t/Users/jamesmead/Code/mocha/lib/mocha/integration/bacon/version_11_and_above.rb:16:in `it'\n\t/Users/jamesmead/Code/mocha/test/acceptance/bacon_spec.rb:62:in `block in <top (required)>'\n\t/Users/jamesmead/Code/mocha/test/acceptance/bacon_spec.rb:8:in `handle_specification'\n\t/Users/jamesmead/Code/mocha/test/acceptance/bacon_spec.rb:27:in `<top (required)>'\n\n1 tests, 0 assertions, 0 failures, 1 errors\n"> expected to be =~
</not all expectations were satisfied/>.

  4) Failure:
test_should_pass_mocha_test(BaconTest)
    [/Users/jamesmead/Code/mocha/test/acceptance/bacon_test.rb:42:in `test_should_pass_mocha_test'
     /Users/jamesmead/Code/mocha/lib/mocha/integration/test_unit/ruby_version_186_and_above.rb:19:in `run']:
<0> expected but was
<1>.

  5) Failure:
test_should_pass_mocha_test_with_matching_parameter(BaconTest)
    [/Users/jamesmead/Code/mocha/test/acceptance/bacon_test.rb:83:in `test_should_pass_mocha_test_with_matching_parameter'
     /Users/jamesmead/Code/mocha/lib/mocha/integration/test_unit/ruby_version_186_and_above.rb:19:in `run']:
<0> expected but was
<1>.

  6) Failure:
test_should_pass_stubba_test(BaconTest)
    [/Users/jamesmead/Code/mocha/test/acceptance/bacon_test.rb:68:in `test_should_pass_stubba_test'
     /Users/jamesmead/Code/mocha/lib/mocha/integration/test_unit/ruby_version_186_and_above.rb:19:in `run']:
<0> expected but was
<1>.

Solution is probably to use explicit namespace for AssertionCounter to avoid ambiguity.

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