Robert Audi
Robert Audi

Reputation: 8477

What should MiniTest::Spec files be named?

I want to use MiniTest::Spec, I found a couple resources to get started, but none of them mentioned what the test files (or spec files) should be named, and where they should be placed:

So which one should I use?

Upvotes: 5

Views: 1358

Answers (2)

Elliot Winkler
Elliot Winkler

Reputation: 2344

It's up to you obviously, but I'd recommend using spec/**/*_spec.rb -- the thinking here being, if MiniTest::Spec is modeled after RSpec in syntax, then you might as well put the tests in the same place that RSpec puts them so people won't be put off guard.

Upvotes: 0

macarthy
macarthy

Reputation: 3069

Assuming you are using rake you can specify your own path in the rake file e.g.

 Rake::TestTask.new do |t|
  t.libs << "test"
  t.test_files = FileList['test/test_*.rb']
  t.verbose = true
end

Upvotes: 1

Related Questions