Inkling Code

Running single shoulda tests

Shoulda is a great addition to normal Rails testing by the way.  Javan Makhmali introduced it to us.

I’ve read elsewhere that you can use regular expressions to run single shoulda tests, because I still don’t have autotest setup.  Uggh.  

So say you have a shoulda test like: 

should “login user with a test saml response from OpenSSO” do 
end

to run that on the command line just do a: 

ruby test/functional/user_controller_test.rb -n /’login user with a test saml response from OpenSSO’/

or if some of those words are more unique to this test this will work: 

ruby test/functional/user_controller_test.rb -n /’OpenSSO’/
normalize until it hurts, denormalize until it works. Coding Horror: Maybe Normalizing Isn’t Normal
It feels pretty badass CodeClimber: Burning the midnight oil
I’m so sick of blogging software. code.inkling is now going to be tumblr