Permalink
Browse files

Don't do anything with bundler at all - bundler does it for us!

See #454 for more info.

- #454
  • Loading branch information...
1 parent 708a4f1 commit c3c572a427efcb36bc9b6fd9babe20ad2e7131d5 @dchelimsky dchelimsky committed Oct 9, 2011
Showing with 3 additions and 53 deletions.
  1. +1 −7 lib/rspec/core/rake_task.rb
  2. +2 −46 spec/rspec/core/rake_task_spec.rb
@@ -30,7 +30,7 @@ class RakeTask < ::Rake::TaskLib
# default:
# false
def skip_bundler=(*)
- RSpec.deprecate("RSpec::Core::RakeTask#skip_bundler=", 'ENV["BUNDLE_GEMFILE"]')
+ RSpec.deprecate("RSpec::Core::RakeTask#skip_bundler=")
end
# Deprecated and has no effect. The rake task now checks
@@ -165,7 +165,6 @@ def files_to_run # :nodoc:
def spec_command
@spec_command ||= begin
cmd_parts = []
- cmd_parts << "bundle exec" if bundler?
cmd_parts << RUBY
cmd_parts << ruby_opts
cmd_parts << "-w" if warning?
@@ -197,11 +196,6 @@ def warning?
def blank
lambda {|s| s == ""}
end
-
- def bundler?
- ENV["BUNDLE_GEMFILE"] if ENV["BUNDLE_GEMFILE"] unless ENV["BUNDLE_GEMFILE"] == ""
- end
-
end
end
end
@@ -10,22 +10,6 @@ def ruby
FileUtils::RUBY
end
- def with_bundle_gemfile(val)
- begin
- orig = ENV['BUNDLE_GEMFILE']
- ENV['BUNDLE_GEMFILE'] = val
- yield
- ensure
- ENV['BUNDLE_GEMFILE'] = orig
- end
- end
-
- def without_bundler
- with_bundle_gemfile nil do
- yield
- end
- end
-
def with_rcov
task.rcov = true
yield
@@ -35,52 +19,24 @@ def spec_command
task.__send__(:spec_command)
end
- context "default (BUNDLE_GEMFILE nil)" do
- it "renders rspec" do
- with_bundle_gemfile nil do
- spec_command.should =~ /^#{ruby} -S rspec/
- end
- end
- end
-
- context "default (BUNDLE_GEMFILE '')" do
+ context "default" do
it "renders rspec" do
- with_bundle_gemfile '' do
- spec_command.should =~ /^#{ruby} -S rspec/
- end
- end
- end
-
- context "with bundler (BUNDLE_GEMFILE non-blank)" do
- it "renders bundle exec rspec" do
- spec_command.should match(/bundle exec/)
+ spec_command.should =~ /^#{ruby} -S rspec/
end
end
context "with rcov" do
it "renders rcov" do
- without_bundler do
with_rcov do
spec_command.should =~ /^#{ruby} -S rcov/
end
end
- end
-
- context "with bundler" do
- it "renders bundle exec rcov" do
- with_rcov do
- spec_command.should =~ /^bundle exec #{ruby} -S rcov/
- end
- end
- end
end
context "with ruby options" do
it "renders them before -S" do
- without_bundler do
task.ruby_opts = "-w"
spec_command.should =~ /^#{ruby} -w -S rspec/
- end
end
end

0 comments on commit c3c572a

Please sign in to comment.