Skip to content

Commit

Permalink
[changelog skip] Run tests for Deivid rodriguez PRs (#1182)
Browse files Browse the repository at this point in the history
* Allow running specs with RSpec 3

The `-s` alias for the documentation formatter was removed in RSpec 3.
See
rspec/rspec-core@b8d55ef.

* Allow configuring `HATCHET_BUILDPACK_BASE`

So that specs can be run on forks.

* Allow `rspec --only-failures` to work by default

It's useful when focusing on fixing a failing test run, since it only
runs currently failing specs.

Co-authored-by: David Rodríguez <[email protected]>
  • Loading branch information
schneems and deivid-rodriguez authored Aug 5, 2021
1 parent 20b1919 commit b3fa53b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ buildpacks/*
.anvil/
tmp/*.log
log/*.log
spec/examples.txt
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ begin

desc "Run specs"
RSpec::Core::RakeTask.new(:spec) do |t|
t.rspec_opts = %w(-fs --color)
t.rspec_opts = %w(-fd --color)
#t.ruby_opts = %w(-w)
end
task :default => :spec
Expand Down
3 changes: 2 additions & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
require 'language_pack'
require 'language_pack/shell_helpers'

ENV["HATCHET_BUILDPACK_BASE"] = "https://github.com/heroku/heroku-buildpack-ruby"
ENV["HATCHET_BUILDPACK_BASE"] ||= "https://github.com/heroku/heroku-buildpack-ruby"

ENV['RACK_ENV'] = 'test'

Expand All @@ -20,6 +20,7 @@
config.full_backtrace = true
config.verbose_retry = true # show retry status in spec process
config.default_retry_count = 2 if ENV['IS_RUNNING_ON_CI'] # retry all tests that fail again
config.example_status_persistence_file_path = 'spec/examples.txt'

config.expect_with :rspec do |c|
c.max_formatted_output_length = Float::INFINITY
Expand Down

0 comments on commit b3fa53b

Please sign in to comment.