[rspec-users] Newbie Error Running specs

allan miller allan.m.miller at gmail.com
Thu Dec 7 03:35:03 EST 2006

I'm new to rspec.  I just installed these:

rspec (0.7.4)    RSpec-0.7.4 (r1201) (rspec gem)
rspec_on_rails .3 plugin (on vendor/plugin)

I've set up a simple spec - spec/library/test_spec.rb:

require File.dirname(__FILE__) + '/../spec_helper'
context "test context" do

  setup do

  specify "nothing to specify" do

When I run this spec as follows:

spec spec/library/test_spec.rb

(or any spec for that matter), I get the following error:

$> spec spec/library/test_spec.rb

`run': You have a nil object when you didn't expect it! (NoMethodError)
You might have expected an instance of Array.
The error occured while evaluating nil.each     from
        from /usr/local/lib/ruby/gems/1.8/gems/rspec-0.7.4/lib/spec/runner/context_runner.rb:22:in
        from /usr/local/lib/ruby/gems/1.8/gems/rspec-0.7.4/lib/spec/runner/command_line.rb:26:in
        from /usr/local/lib/ruby/gems/1.8/gems/rspec-0.7.4/bin/spec:4
        from /usr/local/bin/spec:18

I don't have any idea what is causing this, or how to fix it.  Any
suggestions would be greatly appreciated.  Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/rspec-users/attachments/20061207/1d708751/attachment.html 

More information about the rspec-users mailing list