Help make rspec-1.2 a smooth upgrade

View: New views
4 Messages — Rating Filter:   Alert me  

Help make rspec-1.2 a smooth upgrade

by David Chelimsky-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi all,

I'm planning to release rspec-1.2 and rspec-rails-1.2 shortly after
rails-2.3 goes final (rails-2.3.1 was just released as RC2). There are
a couple of loose ends right now, and I need your help in two
important areas. I've curtailed releasing github gems, so please
clone, build and install the latest [1] if you wish to help out.

== Testing the release

As rails' internals have changed and rspec-rails has kept up with
those changes, I've also been taking the opportunity to clean up much
of rspec-rails' internals (along with those of rspec core). While the
public API has remain *mostly* unchanged [2], the changes to the
internals present some risk for any extension libraries or any of your
own customizations that monkey patch internals. To this end, it would
be very helpful if you would run your rails apps with the latest
rspec/rspec-rails code, and let me know (via reports to
http://rspec.lighthouseapp.com) if you run into any problems.

== Ruby 1.9

RSpec core's specs are all running against ruby 1.9 now. Not so much
with rspec-rails. With rails-2.3.1 (RC2), rspec/rspec-rails-1.1.99.12
[1] and ruby-1.9.1, there is zero feedback. No failures. No errors.
Just nothing.

It would be most appreciated by many if the bold among you could help
to resolve this issue and get rspec-rails working with ruby-1.9.1.

Thanks in advance for your assistance.

Cheers,
David

[1] rspec and rspec-rails > 1.1.99.9 require that you clone the github
repo and build/install locally. Instructions:
http://wiki.github.com/dchelimsky/rspec/releases-and-gems

[2] There is some rspec-rails code that needlessly duplicates
functionality already available in rails' testing framework. To reduce
the maintenance burden, as changes to rails cause problems with
rspec-rails, I've been looking for opportunities to access rails via
public APIs rather than internals. In some cases, this resulted in
changes to rspec-rails. I've documented what I know in
Upgrade.markdown in the root of the rspec-rails source.
_______________________________________________
rspec-devel mailing list
rspec-devel@...
http://rubyforge.org/mailman/listinfo/rspec-devel

Re: Help make rspec-1.2 a smooth upgrade

by mhennemeyer :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

i have the rspec-rails suite running on my system.
I'm running the examples with:

$ ruby spec/rails_suite.rb

from rspec-dev/example_rails_app/vendor/plugins/rspec-rails.

here is the output: http://pastie.org/412600

The no-output issue occurs when i try to run
the examples with 'rake spec'.

I'm still investigating, but i actually know that
(when running the rspec-rails examples with 'rake spec')
the TestCase class' inherited callback is never executed
and so there are no example_groups when it comes to run the examples.

Inside the Spec::Runner::Options#run_examples method there is
a conditional that would only let the examples  run when example_groups.empty?
returns false, but it returns true.

Maybe there is a lib loaded after rspec that overrides the
TestCases inherited callback?

Matthias

System info:
$ ruby -v
#=> ruby 1.9.1p0 (2009-01-30 revision 21907) [i386-darwin9]
$ uname -a
#=> Darwin mac 9.6.0 Darwin Kernel Version 9.6.0: Mon Nov 24 17:37:00 PST 2008; root:xnu-1228.9.59~1/RELEASE_I386 i386


Re: Help make rspec-1.2 a smooth upgrade

by mhennemeyer :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


mhennemeyer wrote:
Maybe there is a lib loaded after rspec that overrides the
TestCases inherited callback?
It is the test-unit 2.0.2 library.
It overrides the inherited callback defined in ExampleGroupMethods.
Quick solution is to uninstall the test-unit 2.0.2 gem.

Matthias

Re: Help make rspec-1.2 a smooth upgrade

by mhennemeyer :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

A better solution than uninstalling test-unit-2.0.2 (quick solution)
is probably to require test-unit version 1.2.3.
I've created a patch:

http://rspec.lighthouseapp.com/projects/5645-rspec/tickets/727-rspec-rails-require-test-unit-123-if-ruby19

Matthias