diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2019-02-26 18:15:44 +0100 |
---|---|---|
committer | David RodrÃguez <deivid.rodriguez@riseup.net> | 2019-03-20 14:22:34 +0100 |
commit | 561494712798e9f8ff9b6abffa1a774d1a883a37 (patch) | |
tree | 24e03d88bb0be4e3111657a2d053c16616794f35 | |
parent | ef70be132706c56fda4f346c77d5a96e176d6b9b (diff) | |
download | bundler-561494712798e9f8ff9b6abffa1a774d1a883a37.tar.gz |
Simplify RSpec task
We shell out to the binstubs, so we don't need any activation dance.
-rw-r--r-- | Rakefile | 26 |
1 files changed, 9 insertions, 17 deletions
@@ -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 |