spherushi/Ising — pull request #1 by cmeury (2013-05-28 15:54:40+00:00)
Title: Unit testing the Spin.spin() method

To demonstrate unit tests, might be helpful for further development. Had to separate the generation of the random spins array from the Spin class. This is a frequent consequence of writing unit tests. One has to refactor the source code under test to facilitate testing, which makes the original code cleaner, more reusable and less coupled.