From: "Darryl L. Pierce" Date: 2011-09-08T22:32:53+09:00 Subject: Test passes alone, but fails under rake... --GlnCQLZWzqLRJED8 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In my development environment (Fedora 15/64-bit, Ruby 1.8.7) I'm experiencing a problem where a unit test passes in isolation but fails when run using Rake with TestTask. What makes it stranger is that it's the same class that fails every time. And the failures are due to the setup method never being invoked, which initializes all of the instance variables for the test. The errors I see are: 34) Error: test_sync_without_block(TestSession): NoMethodError: undefined method `should_receive' for nil:NilClass /home/mcpierce/Programming/Qpid/qpid/cpp/bindings/qpid/ruby/test/test_s= ession.rb:250:in `test_sync_without_block' The object that it says is nil is initialized in setup. And putting as the first line of that method: raise "HELL!" never gets executed under Rake, but does when run directly. Anybody else experience this sort of problem? You can check out the code here: http://github.com/mcpierce/Qpid/tree/Fix-Ruby-unit-tests where the code is down under $REPO/qpid/cpp/bindings/qpid/ruby --=20 Darryl L. Pierce http://mcpierce.multiply.com/ "What do you care what people think, Mr. Feynman?" --GlnCQLZWzqLRJED8 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk5oxAAACgkQtddqM0QFuLLHKQCgnRuHkg1uN1y5RfgEB6pGo6E3 EUcAn3bcG+6D/0nQfl3F/N43+7nAapzv =hapR -----END PGP SIGNATURE----- --GlnCQLZWzqLRJED8--