spec/install/gemspec_spec.rb in bundler-1.0.21 vs spec/install/gemspec_spec.rb in bundler-1.0.22

- old
+ new

@@ -108,9 +108,30 @@ should_be_installed "bar 1.0.0" should_not_be_installed "bar-dev 1.0.0", :groups => :development should_be_installed "bar-dev 1.0.0", :groups => :dev end + it "should match a lockfile even if the gemspec defines development dependencies" do + build_lib("foo", :path => tmp.join("foo")) do |s| + s.write("Gemfile", "source 'file://#{gem_repo1}'\ngemspec") + s.add_dependency "actionpack", "=2.3.2" + s.add_development_dependency "rake", '=0.8.7' + end + + Dir.chdir(tmp.join("foo")) do + bundle "install" + # This should really be able to rely on $stderr, but, it's not written + # right, so we can't. In fact, this is a bug negation test, and so it'll + # ghost pass in future, and will only catch a regression if the message + # doesn't change. Exit codes should be used correctly (they can be more + # than just 0 and 1). + output = bundle("install --deployment") + output.should_not match(/You have added to the Gemfile/) + output.should_not match(/You have deleted from the Gemfile/) + output.should_not match(/install in deployment mode after changing/) + end + end + it "should evaluate the gemspec in its directory" do build_lib("foo", :path => tmp.join("foo")) File.open(tmp.join("foo/foo.gemspec"), "w") do |s| s.write "raise 'ahh' unless Dir.pwd == '#{tmp.join("foo")}'" end