Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

Commit

Permalink
The shared helpers need to load Rubygems now
Browse files Browse the repository at this point in the history
  • Loading branch information
indirect committed Apr 10, 2010
1 parent 0f97e4f commit d2ee319
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
1 change: 0 additions & 1 deletion lib/bundler/setup.rb
Expand Up @@ -7,7 +7,6 @@
if env_file.exist?
require env_file
else
require 'rubygems'
require 'bundler'
begin
Bundler.setup
Expand Down
1 change: 1 addition & 0 deletions lib/bundler/shared_helpers.rb
@@ -1,3 +1,4 @@
require 'rubygems'
require 'pathname'

module Gem
Expand Down
1 change: 0 additions & 1 deletion lib/bundler/templates/environment.erb
Expand Up @@ -2,7 +2,6 @@
# Generated by Bundler <%= Bundler::VERSION %>

require 'digest/sha1'
require 'rubygems'
<%= shared_helpers %>

module Bundler
Expand Down
12 changes: 10 additions & 2 deletions spec/other/exec_spec.rb
Expand Up @@ -92,18 +92,26 @@
end

describe "when locked" do
it "uses .bundle/environment.rb" do
before :each do
gemfile <<-G
gem "rack"
G

bundle "lock"
bundle :lock
should_be_locked
end

it "uses .bundle/environment.rb" do
File.open(".bundle/environment.rb", 'a') { |f| f.puts "puts 'using environment.rb'" }

bundle "exec rackup"
out.should == "using environment.rb\n1.0.0"
end

it "loads the shared helpers successfully" do
bundle "exec ruby -e 'puts'"
err.should be_empty
end
end

describe "with gem binaries" do
Expand Down

0 comments on commit d2ee319

Please sign in to comment.