unit testing - Can I run just tests inside a subfolder of the test folder in Rails (Minitest)? -


hard believe hasn't been asked before, couldn't find it.

i trying run capybara tests inside own folder test/integration/capybara. tried bundle exec rake test test/integration/capybara runs tests under test. in rails guides says can invoke integration tests rake test:integration works. rake test test:integration:capybara doesn't. possible go deeper 1 level?

you can build own rake task. add lib/tasks/test_capybara.rake:

namespace :test   namespace :integration     rake::testtask.new('capybara') |t|       t.libs = ['lib','test']       t.pattern = 'integration/capybara/**/*_test.rb'       t.verbose = true     end   end end 

then run rake test test:integration:capybara.


Comments

Popular posts from this blog

python - Healpy: From Data to Healpix map -

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -