spec/spec_helper.rb in patch_ruby-1.8.0 vs spec/spec_helper.rb in patch_ruby-1.9.0

- old
+ new

@@ -39,10 +39,19 @@ RSpec.configure do |config| # Use FactoryBot for test factories config.include FactoryBot::Syntax::Methods config.before(:suite) do FactoryBot.find_definitions + Patch.configure do |config| + if ENV.fetch('LOCAL_SDK_TEST', false) + config.access_token = ENV.fetch('LOCAL_PATCH_API_KEY') + config.scheme = 'http' + config.host = 'api.patch.test:3000' + else + config.access_token = ENV.fetch('SANDBOX_API_KEY') + end + end end # rspec-expectations config goes here. You can use an alternate # assertion/expectation library such as wrong or the stdlib/minitest # assertions if you prefer. @@ -64,10 +73,16 @@ # a real object. This is generally recommended, and will default to # `true` in RSpec 4. mocks.verify_partial_doubles = true end + # Run specs in random order to surface order dependencies. If you find an + # order dependency and want to debug it, you can fix the order by providing + # the seed, which is printed after each run. + # --seed 1234 + config.order = :random + # The settings below are suggested to provide a good initial experience # with RSpec, but feel free to customize to your heart's content. =begin # These two settings work together to allow you to limit a spec run # to individual examples or groups you care about by tagging them with @@ -104,15 +119,9 @@ # Print the 10 slowest examples and example groups at the # end of the spec run, to help surface which specs are running # particularly slow. config.profile_examples = 10 - - # Run specs in random order to surface order dependencies. If you find an - # order dependency and want to debug it, you can fix the order by providing - # the seed, which is printed after each run. - # --seed 1234 - config.order = :random # Seed global randomization in this process using the `--seed` CLI option. # Setting this allows you to use `--seed` to deterministically reproduce # test failures related to randomization by passing the same `--seed` value # as the one that triggered the failure.