Reputation: 8477
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:
test/test_*
spec/*_spec.rb
So which one should I use?
Upvotes: 5
Views: 1358
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
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