generative
generative copied to clipboard
generative does nothing unless GENERATIVE_COUNT is set
I'm using rspec 2.
The generative tests operate like any other "describe" unless I set the GENERATIVE_COUNT environment variable. This is inconsistent with the README.
The goal was to only set the env var during a Rake RSpec task that you specifically want to use generative with, since RSpec 2 does not support separate orderings. Are you using the Rakefile example from the README? I'd love to get it updated to be correct/clearer.
I'm not using rake. The read me could say that if you run rspec directly, set the env var.
On Wednesday, January 15, 2014, Justin Campbell wrote:
The goal was to only set the env var during a Rake RSpec task that you specifically want to use generative with, since RSpec 2 does not support separate orderings. Are you using the Rakefile example from the README? I'd love to get it updated to be correct/clearer.
— Reply to this email directly or view it on GitHubhttps://github.com/justincampbell/generative/issues/5#issuecomment-32370656 .
During my talk on Monday, I noticed that when I set GENERATIVE_COUNT, rspec runs -all- my tests that many times. If the env var is controlling this, then that makes sense.
@jessitron Could you try the command-and-rake-task
branch? I think this solves many of those issues.
OK! Will do this weekend
On Fri, Jan 17, 2014 at 3:31 PM, Justin Campbell [email protected]:
@jessitron https://github.com/jessitron Could you try the command-and-rake-task branch? I think this solves many of those issues.
— Reply to this email directly or view it on GitHubhttps://github.com/justincampbell/generative/issues/5#issuecomment-32650188 .
@justincampbell I can confirm this has been fixed since command-and-rake-task
has been merged. See https://github.com/levionessa/rb-fizzbuzz/blob/master/spec/fizz_buzz_spec.rb. I through a binding.pry
into the example based test and it only executed once.
Err... correction, the latter issue of setting GENERATIVE_COUNT
and it running all the tests that many times. The initial issue of having to set the environment variable still stands when running rspec
instead of the rake task.
Would it make sense to just change the default here to 100 or something?
Realized defaulting to 1 is also enabling generative to not run non-generative tests the correct number of times...