[rspec-users] Error Running Standalone/Command Line rspec: undefined method Pathname
dchelimsky at gmail.com
Sat Dec 12 13:29:40 EST 2009
On Sat, Dec 12, 2009 at 11:28 AM, athem <allan.m.miller at gmail.com> wrote:
> I've written the following simple rspec test that I'm trying to run
> (rspec 1.2.9) standalone (outside Rails) from the command line and
> getting the following error. Any idea for how to fix this? Thanks.
> $> spec foo_rspec.rb
> 108:in `determine_project_root': undefined method `Pathname' for
> #<Spec::Runner::Options:0x14dc1e4> (NoMethodError).
There is a require 'pathname' statement in the method in options.rb
that calls determine_project_root. Please try adding that to the
beginning of your spec file and see if it works. If so, we'll need to
investigate more to find out why it doesn't work for you as/is when it
works for everyone else.
> foo_rspec.rb file:
> require 'spec_helper'
> class Foo
> describe "A Foo that says boo" do
> before(:each) do
> @foo = Foo.new
> it "should say boo" do
> @foo.should say_boo
> rspec-users mailing list
> rspec-users at rubyforge.org
More information about the rspec-users