Skip to content

Instantly share code, notes, and snippets.

@searls
Last active August 27, 2015 22:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save searls/7e8879de340a8443297d to your computer and use it in GitHub Desktop.
Save searls/7e8879de340a8443297d to your computer and use it in GitHub Desktop.

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

@blowmage
Copy link

What happens when you run this:

$ TESTOPTS="--seed 23939" rake test

I've had some issues using TESTOPTS, so sometimes I've had to use SEED instead:

$ SEED=23939 rake test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment