[rspec-users] How to detect an attribute rename from a view spec?
raasdnil at gmail.com
Thu Jul 3 21:15:17 EDT 2008
On Fri, Jul 4, 2008 at 10:23 AM, Ben Teese <ben.teese at shinetech.com> wrote:
> I'm new to RSpec so excuse me if I'm missing something obvious here. I
> recently renamed an attribute on a model, and my generated view spec didn't
> detect it. This resulted in a defect going through undetected. Even worse,
> I'm not sure how I could reasonably get RSpec to detect such a change.
You should have a look at stories. They provide the integration
testing you are after. Basically, they run through your site page by
page and look to see what is happening.
Alternatively, you can look to using real objects in your specs
instead of lots of stubs. There is a performance hit on your specs,
though for me it has not been a problem.... yet :)
Another option would be something like Selenium, which actually opens
every page of your website one by one.
Rails, RSpec, Puppet and Life blog....
More information about the rspec-users