Skip to content

Commit da03f47

Browse files
alexchdshafik
authored andcommitted
swallow Heroku rake rspec error
1 parent a30b3eb commit da03f47

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed

Rakefile

+14-10
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
1-
require 'rspec/core/rake_task'
2-
3-
task :default => :spec
4-
51
def windows?
62
Rake::Win32.windows?
73
end
84

9-
RSpec::Core::RakeTask.new(:spec) do |t|
10-
t.pattern = "spec/**/*_spec.rb"
11-
t.rspec_opts =
12-
"--format d"
13-
t.rspec_opts += " --color" if !windows?
14-
# t.ruby_opts="-w"
5+
begin
6+
require 'rspec/core/rake_task'
7+
8+
task :default => :spec
9+
10+
desc "Run all specs"
11+
RSpec::Core::RakeTask.new(:spec) do |t|
12+
t.pattern = "spec/**/*_spec.rb"
13+
t.rspec_opts =
14+
"--format d"
15+
t.rspec_opts += " --color" if !windows?
16+
# t.ruby_opts="-w"
17+
end
18+
rescue LoadError # swallow Heroku deploy error
1519
end
1620

1721
def rerun cmd, rerun_opts = nil

0 commit comments

Comments
 (0)