Category Archives: programming

Verifying select field value with Cucumber and Webrat

I’ve been using Cucumber and Webrat for only a couple months now. Today I needed something new and it wasn’t obvious how to make it work. Here’s an example of a test in Cucumber: Given I am Sam When I … Continue reading

Posted in programming, Ruby on Rails | Tagged , , | 16 Comments

Using belongs_to in Rails model validations when the parent is unsaved

Can’t get there from here In one of my Ruby on Rails projects, I have a model validation which is dependent on attributes from a belongs_to parent. Normally, you can refer to a parent model as child.parent and access the … Continue reading

Posted in programming, Ruby on Rails | Tagged , , , | 10 Comments