[rspec-users] [Sinatra] "tried to create Proc object without a block"

Jason Edwards jtanium at gmail.com
Sat Nov 27 17:15:32 EST 2010

I figured that problem out...  Another gem needed to be installed: rack-test


On Sat, Nov 27, 2010 at 11:11 AM, jtanium <jtanium at gmail.com> wrote:
> Hello all,
> I'm a long time Ruby and Rails user, but new to RSpec; I've been using
> Shoulda instead.
> I picked up the book "Service-Oriented Design with Ruby and
> Rails" (http://amzn.to/9sgx99) which uses RSpec throughout. Despite
> being published only a few months ago, it's already out of date.
> Here's the gist with the relevant files: https://gist.github.com/718122
> (you can see where I commented out a few lines trying to get it to
> work).
> I'm guessing the book was written using RSpec 1, and some older
> (unknown) version of Rack. I've got Rack-1.2.1 and RSpec-2.1.0
> installed.
> This is what I get when I run "rspec spec":
>  1) service should return a user by name
>     Failure/Error: get '/api/v1/users/jason'
>     tried to create Proc object without a block
>     # (__DELEGATE__):2:in `send'
>     # (__DELEGATE__):2:in `get'
>     # ./spec/service_spec.rb:23
> I'm guessing the spec just needs a minor tweak or two to start
> working, but I have no idea what that would be.
> Thanks for any help you can provide,
> Jason

More information about the rspec-users mailing list