Rspec2 observations

Just a few observations now that I have completed the upgrade from
RSpec-1 to RSpec-2.

  1. In my project (2800 examples across about 40 files), MRI 1.9.2-p0
    takes roughly 3 times longer to complete the spec run. Runtimes grew
    from 2.2s (rspec 1.3.0) to 6.1s (2.0.0.rc).

  2. Rubinius 1.1.0 runs RSpec-2 without error.

  3. JRuby 1.5.1 runs RSpec-2 without error.

  4. Both Rubinius and JRuby print a deprecation warning while running the
    exact same code as MRI 1.9.2-p0 (which doesn’t print this warning).


DEPRECATION WARNING: you are using a deprecated constant that will
be removed from a future version of RSpec.

  • Spec is deprecated.
  • RSpec is the new top-level module in RSpec-2

/Users/cremes/.rvm/gems/rbx-head/gems/rspec-expectations-2.0.0.rc/lib/rspec/expectations/backward_compatibility.rb:6:in
`const_missing’


I don’t know if this is an issue with RSpec-2 or if Rubinius & JRuby
require an update. Or, perhaps the problem is elsewhere and this warning
is a red herring. Guidance on this would be welcome; I am happy to open
an issue with these other projects if the fault lays there.

All in all, it’s looking good!

cr

On Oct 6, 2010, at 9:09 AM, Chuck R. wrote:

Just a few observations now that I have completed the upgrade from RSpec-1 to RSpec-2.

  1. In my project (2800 examples across about 40 files), MRI 1.9.2-p0 takes roughly 3 times longer to complete the spec run. Runtimes grew from 2.2s (rspec 1.3.0) to 6.1s (2.0.0.rc).

Is this a Rails-3 project? Are you using the time that rspec displays,
or measuring that yourself (including load times before the spec run
starts)?

  • Spec is deprecated.
  • RSpec is the new top-level module in RSpec-2

/Users/cremes/.rvm/gems/rbx-head/gems/rspec-expectations-2.0.0.rc/lib/rspec/expectations/backward_compatibility.rb:6:in `const_missing’


I don’t know if this is an issue with RSpec-2 or if Rubinius & JRuby require an update. Or, perhaps the problem is elsewhere and this warning is a red herring. Guidance on this would be welcome; I am happy to open an issue with these other projects if the fault lays there.

That warning would only happen if something was trying to reference the
Spec module instead of RSpec. Feel free to open an issue for this so we
can track it, but I’m pretty sure it’s not anything RSpec can fix.

Thanks for the feedback!

Cheers,
David

On Oct 6, 2010, at 9:30 AM, David C. wrote:

On Oct 6, 2010, at 9:09 AM, Chuck R. wrote:

Just a few observations now that I have completed the upgrade from RSpec-1 to RSpec-2.

  1. In my project (2800 examples across about 40 files), MRI 1.9.2-p0 takes roughly 3 times longer to complete the spec run. Runtimes grew from 2.2s (rspec 1.3.0) to 6.1s (2.0.0.rc).

Is this a Rails-3 project? Are you using the time that rspec displays, or measuring that yourself (including load times before the spec run starts)?

Nope, no Rails. This is a work project which uses a few gems like
ffi-rzmq, zmqmachine, sequel, mongo/bson, etc. It’s a set of distributed
applications for a trading system; no web stuff at all.

I don’t know if this is an issue with RSpec-2 or if Rubinius & JRuby require an update. Or, perhaps the problem is elsewhere and this warning is a red herring. Guidance on this would be welcome; I am happy to open an issue with these other projects if the fault lays there.

That warning would only happen if something was trying to reference the Spec module instead of RSpec. Feel free to open an issue for this so we can track it, but I’m pretty sure it’s not anything RSpec can fix.

Thanks for the feedback!

I’ll try to pinpoint the error a bit better before opening an issue.

Thanks for a great tool like rspec! It gives me confidence in my code.

cr

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs