[rspec-users] Game development: how to test interactions like an attack?

2012-02-02 Thread Romain Tribes
Hello, I'm writing webgames with Rails and I want to test my code (and even TDD) but I'm really stuck figuring what to test. I read a lot of articles on the subject but I still don't know what to do in my case: how to start? For instance, a simple interaction in most game: a character attacks a

[rspec-users] Game development: how to test interactions like an attack?

2012-02-02 Thread Romain Tribes
Hello, I'm writing webgames with Rails and I want to test my code (and even TDD) but I'm really stuck figuring what to test. I read a lot of articles on the subject but I still don't know what to do in my case: how to start? For instance, a simple interaction in most game: a character attacks a

Re: [rspec-users] Game development: how to test interactions like an attack?

2012-02-02 Thread Matt Wynne
On 2 Feb 2012, at 09:50, Romain Tribes wrote: > Hello, > > I'm writing webgames with Rails and I want to test my code (and even TDD) but > I'm really stuck figuring what to test. > I read a lot of articles on the subject but I still don't know what to do in > my case: how to start? > > For in

Re: [rspec-users] Game development: how to test interactions like an attack?

2012-02-02 Thread Julian Leviston
I always find it's very good to start simply. Make the simplest spec you can imagine, then the next, and so on... What is a spec? Some of this stuff might seem so obvious... for example... when you start playing your game, you expect that it'll present you with something... write a test for tha

Re: [rspec-users] Game development: how to test interactions like an attack?

2012-02-02 Thread Justin Ko
On Feb 2, 2012, at 2:20 AM, Romain Tribes wrote: > Hello, > > I'm writing webgames with Rails and I want to test my code (and even TDD) but > I'm really stuck figuring what to test. > I read a lot of articles on the subject but I still don't know what to do in > my case: how to start? > > For

Re: [rspec-users] getting ActionController::RoutingError when I test namespaced controllers

2012-02-02 Thread Lille
OK, Given spec/controllers and given this is typical of the structure in my functional testing subdirectories... > > api/some_controller_spec.rb > > >   describe Api::SomeController, ... ...when I attempt to test everything in the subdirectories from the root using this command -- rspec spec/con

Re: [rspec-users] getting ActionController::RoutingError when I test namespaced controllers

2012-02-02 Thread David Chelimsky
On Feb 2, 2012, at 6:22 AM, Lille wrote: > OK, > > Given spec/controllers and given this is typical of the structure in > my functional testing subdirectories... > >>> api/some_controller_spec.rb >> >>> describe Api::SomeController, ... > > ...when I attempt to test everything in the subdire

Re: [rspec-users] Game development: how to test interactions like an attack?

2012-02-02 Thread George Dinwiddie
Romain, On 2/2/12 4:50 AM, Romain Tribes wrote: Hello, I'm writing webgames with Rails and I want to test my code (and even TDD) but I'm really stuck figuring what to test. I read a lot of articles on the subject but I still don't know what to do in my case: how to start? For instance, a sim

Re: [rspec-users] getting ActionController::RoutingError when I test namespaced controllers

2012-02-02 Thread Lille
When I use these commands from the application root rspec spec rspec spec/controllers I get errors (an example will be shown below) for every controller test in my subdirectory spec/controllers/api/beta, where the controller namespacing is carried over in any test as follows describe Api::Beta1:

Re: [rspec-users] Game development: how to test interactions like an attack?

2012-02-02 Thread Romain Tribes
Thanks for your attention and your answers! I worked on that the whole afternoon: it's really timeconsuming when you are not used to test! My code is on GitHub : https://github.com/Sephi-Chan/LearnToTest As I said I read a lot of stuff about testing and TDD. Unfortunately, most of the time it

Re: [rspec-users] getting ActionController::RoutingError when I test namespaced controllers

2012-02-02 Thread David Chelimsky
On Feb 2, 2012, at 6:06 PM, Lille wrote: > When I use these commands from the application root > > rspec spec > rspec spec/controllers > > I get errors (an example will be shown below) for every controller > test in my subdirectory spec/controllers/api/beta, where the > controller namespacing i

Re: [rspec-users] getting ActionController::RoutingError when I test namespaced controllers

2012-02-02 Thread Andrew Premdas
On 3 February 2012 00:06, Lille wrote: > When I use these commands from the application root > > rspec spec > rspec spec/controllers > > I get errors (an example will be shown below) for every controller > test in my subdirectory spec/controllers/api/beta, where the > controller namespacing is ca