[rspec-users] RSpec Routing DSL

Joe Fiorini joe at faithfulgeek.org
Mon Oct 18 14:20:48 EDT 2010

I started testing routes for the first time in Rails 3 this weekend
during Rails Rumble. I was so exhausted that I found writing route
specs a very painful task. I came up with my own routing DSL and I'd
love to see it get included in RSpec itself. Before I start adding the
code to rspec-rails, I'd like to get some feedback and see if there
are some ways we could clean it up. Basically the DSL looks like:

describe "My routes" do

  get "/blog" => { controller: "blogs-controller", action: "index" }


You can see all the details and the module used to make it work here:
http://gist.github.com/630176. Thoughts?

More information about the rspec-users mailing list