David C. wrote:
3) If I run “rake spec”, I get multiple failures, all because the
- I only get the color output if I use “rake spec” (not sure why)
Make sure every _spec.rb file requires spec_helper.rb and see if that
solves the problem.
Interesting. So I made sure that the first line in every spec file was
“require File.join(File.dirname(FILE), ‘spec_helper.rb’)” [ and I
assume that this should be a Cardinal Rule to live by ]
and now my 22 tests behave the same way with or without the spec.opts
file in play (either in alphabetical order or by mtime and reversed,
etc.). 21 tests will pass and the 1 test will fail.
Here’s the offending spec.
describe “User account fixtures” do
it “should exist” do
["admin", "bor_admin", "dell_admin", "ibm_admin", "ibm_user1",
“proc”, “van_admin”].each do |login|
This is pretty straight forward - it’s just testing the presence of a
fixture. Now, this fixture is under the test/fixtures directory. Note
that I have NOT changed the fixture path in spec_helper.rb from
spec/fixtures to text/fixtures, and I have not asked for a fixture to be
loaded in any test. However, why would all of my other tests work if no
fixtures were ever being loaded?
I’m still looking into this. Will report results.