diff options
author | Andre Arko <andre@arko.net> | 2015-04-13 21:23:01 -0700 |
---|---|---|
committer | Andre Arko <andre@arko.net> | 2015-04-13 22:50:16 -0700 |
commit | e41edd133a737ed95581a4e850076c7160289269 (patch) | |
tree | 896f72d91172eea039efd8052dc1362ee5a05402 /spec/runtime/gem_tasks_spec.rb | |
parent | 3c3d5c635c23abd43c1e2f1b72d55f6d38956119 (diff) | |
download | bundler-e41edd133a737ed95581a4e850076c7160289269.tar.gz |
Merge tag 'v1.9.4'
Version 1.9.4
Conflicts:
lib/bundler/installer.rb
lib/bundler/match_platform.rb
lib/bundler/source/rubygems.rb
Diffstat (limited to 'spec/runtime/gem_tasks_spec.rb')
-rw-r--r-- | spec/runtime/gem_tasks_spec.rb | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/spec/runtime/gem_tasks_spec.rb b/spec/runtime/gem_tasks_spec.rb new file mode 100644 index 0000000000..5124b05a3c --- /dev/null +++ b/spec/runtime/gem_tasks_spec.rb @@ -0,0 +1,35 @@ +require "spec_helper" + +describe "require 'bundler/gem_tasks'" do + before :each do + bundled_app("foo.gemspec").open("w") do |f| + f.write <<-GEMSPEC + Gem::Specification.new do |s| + s.name = "foo" + end + GEMSPEC + end + bundled_app("Rakefile").open("w") do |f| + f.write <<-RAKEFILE + $:.unshift("#{bundler_path}") + require "bundler/gem_tasks" + RAKEFILE + end + end + + it "includes the relevant tasks" do + with_gem_path_as(Spec::Path.base_system_gems.to_s) do + sys_exec "ruby -S rake -T" + end + + expect(err).to eq("") + expected_tasks = [ + "rake build", + "rake install", + "rake release", + ] + tasks = out.lines.to_a.map { |s| s.split('#').first.strip } + expect(tasks & expected_tasks).to eq(expected_tasks) + expect(exitstatus).to eq(0) if exitstatus + end +end |