Last active
December 16, 2015 02:29
-
-
Save nbfritz/5362726 to your computer and use it in GitHub Desktop.
This test should fail every time. But note the random numbers it fails with when running standalone and through spork.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'spec_helper' | |
| describe 'Random numbers' do | |
| it 'fails every time' do | |
| numbers = 10.times.map { rand(100) } | |
| numbers.join(', ').should eq 'the Tardis' | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'rubygems' | |
| require 'rspec' | |
| require 'spork' | |
| Spork.prefork do | |
| RSpec.configure do |config| | |
| config.treat_symbols_as_metadata_keys_with_true_values = true | |
| config.run_all_when_everything_filtered = true | |
| config.order = 'random' | |
| end | |
| end | |
| Spork.each_run do | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment