-
-
Save searls/85696cbee883c94dfdb6a7a399b08954 to your computer and use it in GitHub Desktop.
This file contains 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 "bundler/inline" | |
gemfile do | |
source 'https://rubygems.org' | |
gem "rspec", "~> 3.10" | |
end | |
require "rspec/autorun" | |
RSpec.configure do |config| | |
config.register_ordering :global do |items| | |
by_suite = items.group_by { |g| g.metadata.fetch(:suite) } | |
# run veggies before fruits | |
by_suite.fetch(:veggie) { [] }.shuffle + by_suite.fetch(:fruit) { [] }.shuffle | |
end | |
end | |
RSpec.describe "Broccoli", suite: :veggie do | |
it "runs" do | |
puts("๐ฅฆ") | |
end | |
end | |
RSpec.describe "Pear", suite: :fruit do | |
it "runs" do | |
puts("๐") | |
end | |
end | |
RSpec.describe "Pepper", suite: :veggie do | |
it "runs" do | |
puts("๐ถ") | |
end | |
end | |
RSpec.describe "Apple", suite: :fruit do | |
it "runs" do | |
puts("๐") | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment