Forum: RSpec Autospec with RSpec 2 beta for Rails 3

Posted by DEfusion (Guest)
on 2010-03-17 14:49
(Received via mailing list)
I can't seem to find autospec installed anywhere after installing the
latest Rails 3 beta. I've tried copying the contents of a script/
autospec from a Rails 2 application but that includes all the test/
file none of the spec files.

Am I missing something as I miss not having autospec to run.
Posted by David Chelimsky (Guest)
on 2010-03-17 15:08
(Received via mailing list)
On Mar 17, 2010, at 8:34 AM, DEfusion wrote:

> I can't seem to find autospec installed anywhere after installing the
> latest Rails 3 beta. I've tried copying the contents of a script/
> autospec from a Rails 2 application but that includes all the test/
> file none of the spec files.
> 
> Am I missing something as I miss not having autospec to run.

http://blog.davidchelimsky.net/2010/03/15/rspec-2-and-autotest/

Cheers,
David
Posted by DEfusion (Guest)
on 2010-03-17 15:28
(Received via mailing list)
If I add that into an autospec/discover.rb file autotest fails with
this:

loading autotest/rspec2
...
/usr/lib/ruby/gems/1.8/gems/rspec-core-2.0.0.beta.4/bin/rspec:2:in
`require': no such file to load -- rspec/autorun (LoadError)
        from /usr/lib/ruby/gems/1.8/gems/rspec-core-2.0.0.beta.4/bin/
rspec:2
Posted by David Chelimsky (Guest)
on 2010-03-17 15:42
(Received via mailing list)
On Mar 17, 2010, at 9:16 AM, DEfusion wrote:

> If I add that into an autospec/discover.rb file autotest fails with
> this:
> 
> loading autotest/rspec2
> ...
> /usr/lib/ruby/gems/1.8/gems/rspec-core-2.0.0.beta.4/bin/rspec:2:in
> `require': no such file to load -- rspec/autorun (LoadError)
>        from /usr/lib/ruby/gems/1.8/gems/rspec-core-2.0.0.beta.4/bin/
> rspec:2

Do you have RUBYOPT=rubygems in your environment?
Posted by DEfusion (Guest)
on 2010-03-17 17:23
(Received via mailing list)
On Mar 17, 2:33 pm, David Chelimsky <dchelim...@gmail.com> wrote:
> > rspec:2
>
> Do you have RUBYOPT=rubygems in your environment?
>

No, should I or shouldn't I?
Posted by DEfusion (Guest)
on 2010-03-17 17:33
(Received via mailing list)
> > Do you have RUBYOPT=rubygems in your environment?
>
> No, should I or shouldn't I?

Okay I added that, should have done that before my last post, now I
get a different issue, the same one Gabriel posted in the comments on
the blog post :

/usr/lib/ruby/1.8/optparse.rb:1445:in `complete': invalid option: -O
(OptionParser::InvalidOption)
        from /usr/lib/ruby/1.8/optparse.rb:1443:in `catch'
        from /usr/lib/ruby/1.8/optparse.rb:1443:in `complete'
        from /usr/lib/ruby/1.8/optparse.rb:1282:in `parse_in_order'
        from /usr/lib/ruby/1.8/optparse.rb:1249:in `catch'
        from /usr/lib/ruby/1.8/optparse.rb:1249:in `parse_in_order'
        from /usr/lib/ruby/1.8/optparse.rb:1243:in `order!'
        from /usr/lib/ruby/1.8/optparse.rb:1334:in `permute!'
        from /usr/lib/ruby/1.8/optparse.rb:1355:in `parse!'
        from /usr/lib/ruby/gems/1.8/gems/rspec-core-2.0.0.beta.4/lib/
rspec/core/command_line_options.rb:22:in `parse'
        from /usr/lib/ruby/gems/1.8/gems/rspec-core-2.0.0.beta.4/lib/
rspec/core/command_line_options.rb:13:in `parse'
        from /usr/lib/ruby/gems/1.8/gems/rspec-core-2.0.0.beta.4/lib/
rspec/core/runner.rb:29:in `run'
        from /usr/lib/ruby/gems/1.8/gems/rspec-core-2.0.0.beta.4/lib/
rspec/core/runner.rb:13:in `autorun'
        from /usr/lib/ruby/gems/1.8/gems/rspec-core-2.0.0.beta.4/bin/
rspec:2
Posted by David Chelimsky (Guest)
on 2010-03-17 17:58
(Received via mailing list)
On Mar 17, 2010, at 11:30 AM, DEfusion wrote:

> 
>>> Do you have RUBYOPT=rubygems in your environment?
>> 
>> No, should I or shouldn't I?
> 
> Okay I added that, should have done that before my last post, now I
> get a different issue, the same one Gabriel posted in the comments on
> the blog post :
> 
> /usr/lib/ruby/1.8/optparse.rb:1445:in `complete': invalid option: -O

You read Gabriel's comment, but not my response to him :)
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.