Note that there are some explanatory texts on larger screens.

plurals
  1. PORecommended testing frameworks for Rails 2 app with randomness
    primarykey
    data
    text
    <p>I have a Rails 2.3.5 app which is serving a card game. I've been a bit lax in writing tests for it (read: I haven't written any :embarrassed:), and I'd like to make a start now.</p> <p>From reading <a href="https://stackoverflow.com/questions/5483146/dhh-on-unit-testing-is-rspec-indeed-needlessly-complicated">other questions</a>, I think I probably want to be using Shoulda extending Test::Unit for unit testing. </p> <p>I wondered about using Capybara extending RSpec for functional testing, but the majority of users' interaction with the app is via POST, which I understand Capybara doesn't handle.</p> <p>Since this is a card game, I obviously need the ability to control <code>rand</code>; I also definitely need the framework to handle Javascript.</p> <ol> <li>Is Test::Unit + Shoulda suitable?</li> <li>Am I correct that Capybara can't handle POST? Can I work around that?</li> <li>Is there a better option instead of Capybara?</li> <li>Can these methods handle the randomness involved in a card-game? Presumably, for Test::Unit at least, I can just call <code>srand</code> at some early stage to fix the generator, but I don't know if that's doable for Capybara/RSpec/anything else.</li> <li>Can anyone point me to resources dealing specifically with setting up Shoulda, Capybara and RSpec for Rails 2.3.5? It's a little hard to tell what's Rails 3 specific and what isn't.</li> <li>Would I gain anything from adding Watir / Firewatir into the mix?</li> </ol> <p>I realise the above questions are manifold, but they basically boil down to "does this work, or have you any better suggestions?"</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload