Skip to content

Instantly share code, notes, and snippets.

@gregkare
Last active August 29, 2015 14:18
Show Gist options
  • Save gregkare/a88bacf666eff0e84066 to your computer and use it in GitHub Desktop.
Save gregkare/a88bacf666eff0e84066 to your computer and use it in GitHub Desktop.
require 'minitest/autorun'
describe 2 do
i_suck_and_my_tests_are_order_dependent!
describe '1' do
it 'runs the spec in the same order' do
puts '1'
end
it 'really runs the spec in the same order' do
puts '2'
end
end
describe '2' do
it 'runs the spec in the same order' do
puts '3'
end
it 'really runs the spec in the same order' do
puts '4'
end
end
end
@gregkare
Copy link
Author

gregkare commented Apr 1, 2015

$ bundle
Resolving dependencies...
Using minitest 5.5.1 (was 5.5.0)
Using bundler 1.9.1
Bundle complete! 1 Gemfile dependency, 2 gems now installed.
Bundled gems are installed into ./vendor/gems.
$ bundle exec ruby lala_spec.rb
Run options: --seed 50400

# Running:

3
.4
.1
.2
.

Finished in 0.003384s, 1182.0331 runs/s, 0.0000 assertions/s.

4 runs, 0 assertions, 0 failures, 0 errors, 0 skips
$ bundle exec ruby lala_spec.rb
Run options: --seed 57613

# Running:

1
.2
.3
.4
.

Finished in 0.004859s, 823.2147 runs/s, 0.0000 assertions/s.

4 runs, 0 assertions, 0 failures, 0 errors, 0 skips

@gregkare
Copy link
Author

gregkare commented Apr 1, 2015

On versions before 5.3.4 it behaves like it should:

$ bundle
Using minitest 5.3.3
Using bundler 1.9.1
Bundle complete! 1 Gemfile dependency, 2 gems now installed.
Bundled gems are installed into ./vendor/gems.
$ bundle exec ruby lala_spec.rb
Run options: --seed 11798

# Running:

1
.2
.3
.4
.

Finished in 0.005156s, 775.7952 runs/s, 0.0000 assertions/s.

4 runs, 0 assertions, 0 failures, 0 errors, 0 skips

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