Posts Tagged ‘rspec’

Switching off transactions for a single spec when using RSpec

Posted by Rahoul Baruah on May 8th, 2009 under Ruby on Rails and Software Development, Writing Reliable, Bug-Free Code Tags: , , , ,  •  Comments Off

I have just written a load of test code that needed to verify that a particular set of classes behaved correctly when a transaction was rolled back.
However, the rest of my suite relied on transactional fixtures (which is Rails’ badly named way of saying that a transaction is started before each test and [...]

Fixing bugs in untested code

Posted by Rahoul Baruah on May 6th, 2009 under Ruby on Rails and Software Development, Writing Reliable, Bug-Free Code Tags: , , , ,  •  Comments Off

When you’ve got an application that has little or no test coverage it can be quite daunting making changes. What if you alter X and it breaks Y? Without running through the entire app by hand how will you know what you’ve broken?
Well you won’t.
Even worse, what if your [...]

The trouble with mocks (or design versus acceptance)

Posted by Rahoul Baruah on March 12th, 2009 under General Tags: , , , , , , , ,  •  2 Comments

I had the pleasure of speaking to Luke Redpath the other day.
I started off by thanking him for his Demeter’s Revenge plugin, which is one of the first things I install on a new project. He said he didn’t use it much any more, as he doesn’t do mocking, except during the design [...]

Acceptance Testing in Ruby, Rails, RSpec and Cucumber

Posted by Rahoul Baruah on November 21st, 2008 under Beautiful Code, Designing Great Software, Ruby on Rails and Software Development, Writing Reliable, Bug-Free Code Tags: , , , , ,  •  Comments Off

I’ve written up a new post at the Brightbox blog detailing how we are using RSpec and Cucumber to build acceptance tests for the next generation Brightbox systems.