summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2019-02-26 18:15:44 +0100
committerDavid Rodríguez <deivid.rodriguez@riseup.net>2019-03-20 11:47:38 +0100
commit26761d13eddbb8cce4292525266e57e74c3e3431 (patch)
treedae1482f4184046e6dcf335a5475b830cc4609cc
parent7b86d538e926be692d42132d59ac2b96affd55cc (diff)
downloadbundler-26761d13eddbb8cce4292525266e57e74c3e3431.tar.gz
Simplify RSpec task
We shell out to the binstubs, so we don't need any activation dance.
-rw-r--r--Rakefile26
1 files changed, 9 insertions, 17 deletions
diff --git a/Rakefile b/Rakefile
index 605c9c1b8e..52942a885c 100644
--- a/Rakefile
+++ b/Rakefile
@@ -85,14 +85,12 @@ namespace :spec do
end
end
-begin
- rspec = bundler_spec.development_dependencies.find {|d| d.name == "rspec" }
- gem "rspec", rspec.requirement.to_s
- require "rspec/core/rake_task"
-
- desc "Run specs"
- RSpec::Core::RakeTask.new
+desc "Run specs"
+task :spec do
+ sh("bin/rspec")
+end
+begin
require "rubocop/rake_task"
rubocop = RuboCop::RakeTask.new
rubocop.options = ["--parallel"]
@@ -138,9 +136,8 @@ begin
releases = %w[v2.5.2 v2.6.14 v2.7.9 v3.0.3]
(branches + releases).each do |rg|
desc "Run specs with RubyGems #{rg}"
- RSpec::Core::RakeTask.new(rg) do |t|
- t.rspec_opts = %w[--format progress --color]
- t.ruby_opts = %w[-w]
+ task rg do
+ sh("bin/rspec")
end
# Create tasks like spec:rubygems:v1.8.3:sudo to run the sudo specs
@@ -179,9 +176,8 @@ begin
end
desc "Run specs under a RubyGems checkout (set RG=path)"
- RSpec::Core::RakeTask.new("co") do |t|
- t.rspec_opts = %w[--format documentation --color]
- t.ruby_opts = %w[-w]
+ task "co" do
+ sh("bin/rspec")
end
task "setup_co" do
@@ -230,10 +226,6 @@ begin
end
end
rescue LoadError
- task :spec do
- abort "Run `rake spec:deps` to be able to run the specs"
- end
-
task :rubocop do
abort "Run `rake spec:deps` to be able to run rubocop"
end