August 5th, 2010 – 04:46 PM
Read “Pure Rspec”, a great slideshow by Jon “Lark” Larkowski.
It contains some really cool rspec tips and hints, how to write your tests more readable and compact.
July 28th, 2010 – 01:13 PM
Testing the view in Rspec is just great. It allows you to test the view in total isolation. It just does the render. Make sure you set up some data that is needed, and then check if all areas are available for instance.
Now for Rspec2 a lot of things have changed:
have_tag is no longer supported: [...]
July 27th, 2010 – 09:22 AM
STATUS_EXPECTED_TRANSLATIONS = [ [inp1, outp1], … ]
it "should translate received statuses" do
STATUS_EXPECTED_TRANSLATIONS.each do |tr|
controller.send(’translate_status_to_envelope_status’, tr[0]).should == tr[1]
[...]
July 27th, 2010 – 07:27 AM
For Test::Unit there is a module called skippy, that allows you to skip for instance slow tests.
I was looking for a way to achieve the same in Rspec. I am currently developing against Rails 3.0.0.rc, and using rspec 2.0.0.beta.19 and could not find anything. So i asked on the rspec mailing list and got a [...]
December 29th, 2009 – 07:34 PM
I am developing Ruby on Rails on Windows platforms mostly. But using Rspec and cucumber on windows has a very strange side-effect: all a’s are missing as can be seen from the following screenshot:
Luckily, after some very extensive googling, i found a single blogpost with a fix!
Apparently it has something to do with UTF-8 [...]