Tag Archive | "RSpec"

Designing a quiz with plain text user stories

April 1, 2008 Comments Off

Over the next couple of posts I thought that I would like to discuss the redevelopment of my hiragana and katakana quiz software. This software originally started out as a command-line Perl script, became a PHP web script, before turning into a Ruby on Rails web application. Unfortunately, although the development language changed and possibilities [...]

The perils in trusting syntax highlighting

February 14, 2008 Comments Off

Today after upgrading RSpec I ran a user story that I had just written and received a wonderful error: You have a nil object when you didn’t expect it! (NoMethodError). The error occurred while evaluating nil.add_scenario. I didn’t even think to check my user story because the syntax highlighting looked fine and it made sense [...]

an assert_difference that works with arrays

November 23, 2006 Comments Off

I have started using the better assert_difference that was posted at blog.caboo.se to improve my rails tests. This allowed me to write tests such as: assert_difference Item, :count do Item.create(:name => “Monkey magic”) end This replaces: item_count = Item.count Item.create(:name => “Monkey magic”) assert_difference, item_count + 1, Item.count but I also wanted to be able [...]



Flags…