From: Chad Perrin Date: 2011-06-19T11:44:32+09:00 Subject: Re: test scope issue --rwEMma7ioTxnRzrJ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Jun 19, 2011 at 10:17:19AM +0900, Douglas Seifert wrote: > Each test method gets a new @life instance because the setup method runs > before each test. The theory is each test should run without side affects > from other tests. I am no testing expert either, but I would write your > test in one method. >=20 > def test_vivify_and_murder > @life.vivify(2,-1) > assert( @life.world[2][-1] ) > @life.murder(2,-1) > assert( !@life.world[2][-1] ) > end >=20 > Again, I'm sure this is considered poor style and not pure TDD/BDD. I should have read a bit more closely about setup, I guess. I had no idea that was where the problem existed, though. Thanks for the information! I'll make good use of it. --=20 Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ] --rwEMma7ioTxnRzrJ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAk39XvgACgkQ9mn/Pj01uKXN6QCg1JnueQWjFFccAJDxlSXG7cxW +pkAoOXmhsR2Xnq/imMRX0ZHDizKi8jB =waFO -----END PGP SIGNATURE----- --rwEMma7ioTxnRzrJ--