Don_F
August 11, 2010, 4:47am
1
I have a non rails app using rspec2. I created the autotest/
discover.rb and put in it Autotest.add_discovery {“rspec2”}. When I
run under bundler I get -
loading autotest/rspec2
and a prompt back
When standalone I get:
loading autotest/rspec2
style: Rspec2
and a prompt. Any ideasas to the problem. I am sure I am missing
something because there is no rails involved.
Mahalo
Don F.
Don_F
August 11, 2010, 8:44pm
2
Any help on this. I think I have read all posts related to autotest
but still do not have the answer. Is there something that works better
with Rspec that autotest?
Don F.
Don_F
August 11, 2010, 9:00pm
3
On 11 Aug 2010, at 19:44, Don F. wrote:
Any help on this. I think I have read all posts related to autotest
but still do not have the answer. Is there something that works better
with Rspec that autotest?
When you say “and a prompt (back)” … do you mean autotest exits in
both situations and doesn’t run any tests?
(I’m running autotest with RSpec 2 fine, BTW.)
Ash
–
http://www.patchspace.co.uk/
http://www.linkedin.com/in/ashleymoran
Don_F
August 12, 2010, 1:15am
4
On Aug 11, 2010, at 4:54 PM, Don F. wrote:
That is correct. No tests are run. Just get the OS command prompt
back.
You said in an earlier post that this happens whether you run this under
bundler or not. What, precisely, are the commands you’re using?
Don_F
August 11, 2010, 11:54pm
5
That is correct. No tests are run. Just get the OS command prompt
back.
Don F.
On Aug 11, 8:49 am, Ashley M. [email protected]
Don_F
August 12, 2010, 9:40am
6
under bundler bundle exec autotest standalone autotest both within
the project directory and there is a spec subdirectory with the spec
in them.
Don_F
August 12, 2010, 8:31pm
7
On 12 Aug 2010, at 08:27, Don F. wrote:
under bundler bundle exec autotest standalone autotest both within
the project directory and there is a spec subdirectory with the spec
in them.
What happens when you run rspec spec
?
What is in your spec_helper.rb file?
What is the output of find spec
?
That’s all I can think of asking right now…
–
http://www.patchspace.co.uk/
http://www.linkedin.com/in/ashleymoran
Don_F
August 12, 2010, 10:10pm
8
The helper file does not have anything in it as of right now. It had
the the old
#begin
require ‘spec’
#rescue LoadError
require ‘rubygems’ unless Config[‘NO_RUBYGEMS’]
gem ‘rspec’
require ‘spec’
#end
from rspec 1.3.0
Now it is empty. This project was generated via newgem.
I want to upgrade to rspec2 and ruby 1.9.2. Doing it in stages
currently 1.9.1.
Don F.
On Aug 12, 8:21 am, Ashley M. [email protected]
Don_F
August 12, 2010, 10:23pm
9
On Aug 12, 2010, at 3:08 PM, Don F. wrote:
Now it is empty.
I can’t find it, but I could swear there was a bug report about empty
spec files causing rspec to not output anything. Try putting some code
in there and see what happens.
Don_F
August 12, 2010, 11:00pm
10
put in
$:.unshift(File.dirname(FILE ) + ‘/…/lib’)
require ‘reader’
and get the same thing
dhf
Don_F
August 12, 2010, 10:17pm
11
rspec spec works fine and provides test results.
The helper file does not have anything in it. It had the the old
#begin
require ‘spec’
#rescue LoadError
require ‘rubygems’ unless Config[‘NO_RUBYGEMS’]
gem ‘rspec’
require ‘spec’
#end
from rspec 1.3.0
Now it is empty. This project was generated via newgem.
I want to upgrade to rspec2 and ruby 1.9.2. Doing it in stages
currently 1.9.1.
Don F.
On Aug 12, 8:21 am, Ashley M. [email protected]
Don_F
August 12, 2010, 11:30pm
12
There are lots of spec files. I can run them using rspec spec and
everything is great. just the autotest does not work.
Don F.
Don_F
August 12, 2010, 11:01pm
13
I put in:
$:.unshift(File.dirname(FILE ) + ‘/…/lib’)
require ‘reader’
and it still does nothing.
dhf
Don_F
August 12, 2010, 11:49pm
14
On Aug 12, 2010, at 4:02 PM, Don F. wrote:
There are lots of spec files. I can run them using rspec spec and
everything is great. just the autotest does not work.
Don F.
Did you create autotest/discover.rb?
http://blog.davidchelimsky.net/2010/03/15/rspec-2-and-autotest/
Don_F
August 13, 2010, 12:34am
15
yep: Autotest.add_discovery {“rspec2”}
in the base project directory
dhf
Don_F
August 13, 2010, 6:02pm
16
On Aug 12, 2010, at 11:09 pm, Don F. wrote:
yep: Autotest.add_discovery {“rspec2”}
in the base project directory
I’m at the point of asking “did you turn it off and on again?” :-/
Can you give your Ruby installation details? (versions etc, ideally the
output of rvm info
and gem list
and/or your Gemfile)
–
http://www.patchspace.co.uk/
http://www.linkedin.com/in/ashleymoran
Don_F
August 13, 2010, 11:16pm
17
Not sure what you meant by “did you turn it off and on again?”
The other information is here:
http://pastie.org/1091155
Don F.
On Aug 13, 5:50 am, Ashley M. [email protected]
Don_F
August 14, 2010, 5:04pm
18
On 13 Aug 2010, at 22:16, Don F. wrote:
Not sure what you meant by “did you turn it off and on again?”
Ah, I just meant I was running out of ideas[1].
The other information is here:
http://pastie.org/1091155
All I can suggest is maybe updating RVM and trying in Ruby 1.9.2 with a
fresh gemset and bundle install?
Other than that I’m out of ideas…
Ash
[1] - YouTube
–
http://www.patchspace.co.uk/
http://www.linkedin.com/in/ashleymoran
Don_F
August 13, 2010, 11:17pm
19
I converted from rspec 1.3 to rspec 2
On Aug 13, 5:50 am, Ashley M. [email protected]
Don_F
August 14, 2010, 8:03pm
20
Thought that was what you meant, but did not want to leave anything
untried. I have updated to 1.9.2-rc2. same problem. I am going to
have to do an update to snow leopard soon, may try it and put new code
on not just restore.
Don F.
On Aug 14, 4:40 am, Ashley M. [email protected]