[rspec-users] spec_server requiring absolute paths (and autotest breaking)

Jarkko Laine jarkko at jlaine.net
Wed Feb 20 01:52:45 EST 2008

On 20.2.2008, at 6.55, Scott Taylor wrote:
>> That said, now that autotest runs via drb, it's vastly (like 50%)
>> slower than without it,
> That's the idea.

Isn't the idea that specs run faster through drb, rather than slower?  
However, in general my specs seem to take a lot longer when run  
through autotest in the first place (compared to running just rake  
spec:models, e.g.). I haven't so far been able to track down what  
causes this.

>> Mock 'Location_18994' expected :valid? with (any args) once, but
>> received it twice
> I saw this happen recently when the spec server was started twice:
> once with the rake task (rake spec:server:start), the other with a
> straight script/spec_sever.  My hunch is that both servers are
> loading the files at the same time.

That would seem logical. However, I just checked that I only have one  
spec_server process running and am still able to reproduce the problem.

>> expected: "Barney Hops doesn't have the required competency (MBA)
>> to teach this class",
>>     got: ["Barney Hops doesn't have the required competency (MBA)
>> to teach this class", "Barney Hops doesn't have the required
>> competency (MBA) to teach this class"]
> Yeah - this is because rails load's instead of requires.  You'll also
> see this sort of thing if you just call load directly in your specs.
> I've never dug deeper into how all of the rails magic happens
> regarding loading and constants (and the method generation with the
> association macros (has_* belongs_to), so if you have any insight,
> I'd be happy to hear it.

Yeah, all these failures are certainly related and probably caused by  
something like what you describe. Got to try to figure out what  
spec_server does differently than normal spec. Or maybe we should just  
bite the bullet and make the deeptest spec fork work :-)


Jarkko Laine

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2417 bytes
Desc: not available
Url : http://rubyforge.org/pipermail/rspec-users/attachments/20080220/6c07b70e/attachment.bin 

More information about the rspec-users mailing list