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

Paul D. lists at ruby-forum.com
Sun Dec 5 16:04:30 EST 2010


Ok, I've updated the code examples in Chapter 1 to use the latest gem
versions. Also, I've included a gemfile so going forward new gem
versions shouldn't break anything. You'll just be able to bundle
install to get the right ones.

Code here:
https://github.com/pauldix/service-oriented-design-with-ruby/tree/master/chapter_01

README for chapter 1 code:
https://github.com/pauldix/service-oriented-design-with-ruby/blob/master/chapter_01/README

I'll be updating the other code examples more today and in the coming
week. Let me know if there are any issues.

Thanks,
Paul

jtanium wrote in post #964516:
> 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

-- 
Posted via http://www.ruby-forum.com/.


More information about the rspec-users mailing list