All blog posts tagged with rspec

RSpec/Rails view specs and helpers

August 21, 2007

I ran into a situation today where I had to mock out a helper method in a view spec. After a bit of poking around came across Jake Scruggs blog where he has a post titled, appropriately enough, Mocking/Stubbing partials and helper methods in RSpec view tests.

For the lazy, it's just:

@controller.te…

Read more

RSpec on Rails rake task for Recent Specs

June 5, 2007

As our number of specs grow I started to miss the test:recent functionality, so I created a simple little rake task to make it work with RSpec. Drop this in lib/tasks, I called it spec_recent.rake.

require 'spec/rake/spectask'
# Grab recently touched specs
def recent_specs(touched_since)
  recent_s…

Read more

Enforcing spec coverage with CruiseControl, RCov, and RSpec

June 1, 2007

Now that Alex has gotten CruiseControl.rb setup setup at work, I wanted to use it to enforce good test coverage - and I wanted the output to look good doing it. Turns out this isn't that hard, but requires a few things:

Read more

Changing rake :default to use RSpec

May 29, 2007

I dug around a little before digging into the Rake RDoc (which is great!), but I didn't find anything on the intertubes about this so I figured I'd post here in case somebody else is looking.

Hijacking the default Rails rake tasks is actually pretty easy, but if you just try to redefine it by adding…

Read more

Displaying all 4 posts

Blog Archives

Recent Comments