UPDATE: @GordonDiggs figured it out. Args need the =
sign, so the command should have been $ rake test TESTOPTS="--seed=23939"
When I run this:
$ rake test TESTOPTS="--seed 23939"
I expect it to run with a certain seed, but instead I get
/Users/justin/.rbenv/versions/2.1.6/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- /Users/justin/code/testdouble/forewarn/23939 (LoadError)
As if it's trying to load a file named 23939
.
As if it's trying to load that file.
Rake config is:
Rake::TestTask.new do |t|
t.libs << 'test'
t.pattern = "test/**/test_*.rb"
end
Repo is here: https://github.com/testdouble/forewarn
What happens when you run this:
$ TESTOPTS="--seed 23939" rake test
I've had some issues using
TESTOPTS
, so sometimes I've had to useSEED
instead:$ SEED=23939 rake test