summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Arko <andre@arko.net>2013-10-19 17:09:03 -0700
committerAndre Arko <andre@arko.net>2013-10-19 17:23:53 -0700
commitdb8a1d9794fb622e29d0b824dd0bc36adcf89b88 (patch)
tree614ca8f97f3022d2aeaf54b4cf5b0870c904322f
parentc402caa94bd3394e1004b99ee70812a7e0f9b3fd (diff)
downloadbundler-db8a1d9794fb622e29d0b824dd0bc36adcf89b88.tar.gz
gemspecs spec
-rw-r--r--spec/install/gems/simple_case_spec.rb45
-rw-r--r--spec/install/gemspecs_spec.rb50
2 files changed, 50 insertions, 45 deletions
diff --git a/spec/install/gems/simple_case_spec.rb b/spec/install/gems/simple_case_spec.rb
index 63a6d31289..945514cb7a 100644
--- a/spec/install/gems/simple_case_spec.rb
+++ b/spec/install/gems/simple_case_spec.rb
@@ -397,32 +397,6 @@ describe "bundle install with gem sources" do
end
end
- describe "when a gem has a YAML gemspec" do
- before :each do
- build_repo2 do
- build_gem "yaml_spec", :gemspec => :yaml
- end
- end
-
- it "still installs correctly" do
- gemfile <<-G
- source "file://#{gem_repo2}"
- gem "yaml_spec"
- G
- bundle :install
- expect(err).to be_empty
- end
-
- it "still installs correctly when using path" do
- build_lib 'yaml_spec', :gemspec => :yaml
-
- install_gemfile <<-G
- gem 'yaml_spec', :path => "#{lib_path('yaml_spec-1.0')}"
- G
- expect(err).to eq("")
- end
- end
-
describe "bundler dependencies" do
before(:each) do
build_repo2 do
@@ -583,23 +557,4 @@ describe "bundle install with gem sources" do
end
end
- it "should use gemspecs in the system cache when available" do
- gemfile <<-G
- source "http://localtestserver.gem"
- gem 'rack'
- G
-
- FileUtils.mkdir_p "#{tmp}/gems/system/specifications"
- File.open("#{tmp}/gems/system/specifications/rack-1.0.0.gemspec", 'w+') do |f|
- spec = Gem::Specification.new do |s|
- s.name = 'rack'
- s.version = '1.0.0'
- s.add_runtime_dependency 'activesupport', '2.3.2'
- end
- f.write spec.to_ruby
- end
- bundle :install, :artifice => 'endpoint_marshal_fail' # force gemspec load
- should_be_installed "activesupport 2.3.2"
- end
-
end
diff --git a/spec/install/gemspecs_spec.rb b/spec/install/gemspecs_spec.rb
new file mode 100644
index 0000000000..c3ac0fc69e
--- /dev/null
+++ b/spec/install/gemspecs_spec.rb
@@ -0,0 +1,50 @@
+require 'spec_helper'
+
+describe "bundle install" do
+
+ describe "when a gem has a YAML gemspec" do
+ before :each do
+ build_repo2 do
+ build_gem "yaml_spec", :gemspec => :yaml
+ end
+ end
+
+ it "still installs correctly" do
+ gemfile <<-G
+ source "file://#{gem_repo2}"
+ gem "yaml_spec"
+ G
+ bundle :install
+ expect(err).to be_empty
+ end
+
+ it "still installs correctly when using path" do
+ build_lib 'yaml_spec', :gemspec => :yaml
+
+ install_gemfile <<-G
+ gem 'yaml_spec', :path => "#{lib_path('yaml_spec-1.0')}"
+ G
+ expect(err).to eq("")
+ end
+ end
+
+ it "should use gemspecs in the system cache when available" do
+ gemfile <<-G
+ source "http://localtestserver.gem"
+ gem 'rack'
+ G
+
+ FileUtils.mkdir_p "#{tmp}/gems/system/specifications"
+ File.open("#{tmp}/gems/system/specifications/rack-1.0.0.gemspec", 'w+') do |f|
+ spec = Gem::Specification.new do |s|
+ s.name = 'rack'
+ s.version = '1.0.0'
+ s.add_runtime_dependency 'activesupport', '2.3.2'
+ end
+ f.write spec.to_ruby
+ end
+ bundle :install, :artifice => 'endpoint_marshal_fail' # force gemspec load
+ should_be_installed "activesupport 2.3.2"
+ end
+
+end \ No newline at end of file