[rspec-devel] [ rspec-Bugs-14527 ] specs run twice on rails 1.2.4 and rspec/rspec_on_rails trunk

noreply at rubyforge.org noreply at rubyforge.org
Sun Oct 7 20:56:39 EDT 2007


Bugs item #14527, was opened at 2007-10-07 23:52
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3149&aid=14527&group_id=797

Category: rails plugin
Group: None
>Status: Closed
>Resolution: Accepted
Priority: 3
Submitted By: Jack Dempsey (jackdempsey)
>Assigned to: David Chelimsky (dchelimsky)
Summary: specs run twice on rails 1.2.4 and rspec/rspec_on_rails trunk

Initial Comment:
I think this might be related to the Textmate 'specs run twice' bug entered on 9/10.

I'm using rails 1.2.4 and trunk on both rspec and rspec_on_rails and i'm noticing things running twice:

~/spec_example $ rake spec
(in /Users/jdempsey/spec_example)

      *******************************************************************
      * config.breakpoint_server has been deprecated and has no effect. *
      *******************************************************************
      


Finished in 0.002407 seconds

0 examples, 0 failures


Finished in 9.0e-06 seconds

0 examples, 0 failures


You can easily duplicate this by creating a skeleton rails app, freezing to edge, checking out the trunk of rspec and rspec_on_rails plugins, creating the db's and running rake spec. 

I saw two mentions of this on ohloh when i was looking around before:

Aug 22 2007 23:08  	aslak.hellesoy (aslak_hellesoy)  	Moved Spec::Distributed to rspec-ext project,

Sep 21 2007 11:33  	btakita  	Fixed bin/spec running the specs twice issue (I think) [Details] removed mtime/reverse to get
 more consistent running, removed rspec_suite.rb since it broke 'ruby bin/spec spec' (things got loaded twice) [Details]


I couldn't quite figure out why things aren't working, but I do know that when you remove this from lib/spec.rb:

at_exit do
  unless rspec_options.examples_run?; exit rspec_options.run_examples; end
end

things don't run twice...

So, any thoughts? I'm going to see if I can figure out why and will submit a patch if so, but wanted to bring this up to start things off. 

Thanks!

----------------------------------------------------------------------

>Comment By: David Chelimsky (dchelimsky)
Date: 2007-10-08 00:56

Message:
Fixed in r2700

I think those lines in spec.rb are residual from a refactoring we are currently working on. I've removed them and all seems well for the moment.

----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3149&aid=14527&group_id=797


More information about the rspec-devel mailing list