1

In our current applications we only run Test::Unit tests. So we do rake test and it runs all the tests under test. I'm adding a rspec directory as well and I want the rspecs to run when I do rake test instead of manually also doing rspec spec.

Any idea how to combine both under rake test?

We have our TestTask under the gems for example vendor/gems/shoulda-2.10.3/Rakefile:Rake::TestTask.new do |t| ...

and in application.rb we have

config.generators do |g|
  g.test_framework :shoulda
  g.fallbacks[:shoulda] = :test_unit
  g.fixture_replacement :factory_girl
end

2 Answers 2

3

Add the following line in the Rakefile, It will Run the spec and test task, when you execute the rake test

task :test => :spec
0
1

RSpec can actually run your Test::Unit cases for you, just require 'spec/test/unit'

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.