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 14:22:34 +0100
commit561494712798e9f8ff9b6abffa1a774d1a883a37 (patch)
tree24e03d88bb0be4e3111657a2d053c16616794f35
parentef70be132706c56fda4f346c77d5a96e176d6b9b (diff)
downloadbundler-561494712798e9f8ff9b6abffa1a774d1a883a37.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 c539c400f2..ec4a520ac3 100644
--- a/Rakefile
+++ b/Rakefile
@@ -90,14 +90,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"]
@@ -143,9 +141,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
@@ -184,9 +181,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
@@ -235,10 +231,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