Hello, I'm writing a Risk-like webgame (https://github.com/Sephi-Chan/Conquest-on-Rails) and I want to add tests, but it's painful since objects have a lot of dependencies each other.
For instance, I have moved the attack logic in a dedicated class (https://github.com/Sephi-Chan/Conquest-on-Rails/blob/develop/app/models/attack.rb) and I would like to test it. The problem is that to test an attack, I need to have at least two ownerships (the relation between a territory and a participation). And to have two ownerships, I need to have many participations (the relation between a player and a game), and for that I need players. It's a lot of setup for a quite simple test. So, what should I do? Should I write a big setup for my suite? Or can I write a "sub-suites" with this big setup? Thanks!
_______________________________________________ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users