[rspec-users] Rspec2 / Rails3 / test_unit

David Chelimsky dchelimsky at gmail.com
Fri Jul 2 14:19:28 EDT 2010

On Jul 2, 2010, at 11:11 AM, Arco wrote:

> I generate a new rails3 app using "rails new my_app -T".
> Then i run "cd my_app ; rails generate", and I don't see any test_unit
> options. (as expected).
> Then I put "gem 'rspec-rails'" into my Gemfile, and re-run "rails
> generate".
> Now I see options for test_unit.
> TestUnit:
>  test_unit:controller
>  test_unit:helper
>  test_unit:integration
>  ...
> Why does it show options for test_unit?  Is this expected?

This is not anything that RSpec is doing in any intentional way. rspec-rails does require 'test/unit/assertions' and 'test/unit/assertionfailederror', but not 'test/unit' (top level).

I'd guess it's something to do with rspec-rails generators telling rails to use them for testing, so it also shows you the other testing possibilities. But that's just a guess.

> Tx, Andy
> Rails Beta4, Rspec Beta15, Ruby 1.8.7, Ubuntu 10.04

More information about the rspec-users mailing list