diff options
author | Stefan Lance <stefan@lances.net> | 2015-06-18 10:45:11 -0500 |
---|---|---|
committer | Samuel E. Giddins <segiddins@segiddins.me> | 2015-07-16 16:50:09 -0700 |
commit | c87cc8f092428680e214b817536b33ae3cd277e0 (patch) | |
tree | 52cda2ce07aba5a1aa12b3865eee1cb0c2c205de | |
parent | 60044b7b4ad0aa90021a152dc25b01b97eeebd32 (diff) | |
download | bundler-c87cc8f092428680e214b817536b33ae3cd277e0.tar.gz |
Check that err includes error msgs in specs
-rw-r--r-- | spec/install/gemfile/path_spec.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/spec/install/gemfile/path_spec.rb b/spec/install/gemfile/path_spec.rb index 114ce77c1d..5eb3adc01c 100644 --- a/spec/install/gemfile/path_spec.rb +++ b/spec/install/gemfile/path_spec.rb @@ -139,6 +139,26 @@ describe "bundle install with explicit source paths" do should_be_installed "premailer 1.0.0" end + it "errors on invalid specs", :rubygems => "1.7" do + build_lib "foo" + + gemspec = lib_path("foo-1.0").join("foo.gemspec").to_s + File.open(gemspec, "w") do |f| + f.write <<-G + Gem::Specification.new do |s| + s.name = "foo" + end + G + end + + install_gemfile <<-G, :expect_err => true + gem "foo", :path => "#{lib_path("foo-1.0")}" + G + + expect(err).to match(/missing value for attribute version/) + should_not_be_installed("foo 1.0") + end + it "supports gemspec syntax" do build_lib "foo", "1.0", :path => lib_path("foo") do |s| s.add_dependency "rack", "1.0" |