Hello my fellow RSpeckers, I am using the spec command like this:
spec tokyo_record_spec.rb And the for some reason the should_raise Rspec command is not happening with my lambda block: it "should raise a NoSuchAttribute error if the attribute 'name' hasn't been declared yet and you try to create a persisted instance of the object." do lambda { User.create( :name => 'Dustin') }. should_raise( NoSuchAttribute ) end Here is the error: undefined method `should_raise' for #<Proc:[EMAIL PROTECTED]/ tokyo_record_spec.rb:77> ./tokyo_record_spec.rb:77: I'm not sure how the `spec` command actually works, and I'm sure that's at least one source of my confusion. Also, I don't know where `should_raise` is defined either. If anybody could help me clear the clouds in my brain, I would greatly appreciate it. Please point me in a sunnier direction. This is straight Ruby code. It has nothing to do with Rails. My directory structure looks something like this: /tokyo /tokyo/tokyo_record.rb /tokyo/tokyo_record_spec.rb And at the top of /tokyo/tokyo_record_spec.rb I have only require 'tokyo_record' which is a homemade Ruby module that I'm trying to spec with RSpec. I am running gem version 1.2.0, RSpec 1.1.9 and hoe 1.8.0 on OS X 10.4.11. Thank you, David :) _______________________________________________ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users