diff options
author | Carl Lerche <carllerche@mac.com> | 2010-03-09 22:09:19 -0800 |
---|---|---|
committer | Carl Lerche <carllerche@mac.com> | 2010-03-09 22:11:09 -0800 |
commit | 529d792205b2cf66cad7179f32baee391b46e545 (patch) | |
tree | 229b2be4e7b71eb4a10f5f72cc029a507fb087de /spec/support | |
parent | 3a383f813acdba5bb465e42952f43d51c4a58b2e (diff) | |
download | bundler-529d792205b2cf66cad7179f32baee391b46e545.tar.gz |
Use tsort to order specifications. It makes teh crazy work.
Diffstat (limited to 'spec/support')
-rw-r--r-- | spec/support/builders.rb | 55 |
1 files changed, 54 insertions, 1 deletions
diff --git a/spec/support/builders.rb b/spec/support/builders.rb index 2143f555..f8ad30d7 100644 --- a/spec/support/builders.rb +++ b/spec/support/builders.rb @@ -134,6 +134,59 @@ module Spec s.write "lib/bundler/omg.rb", "" s.write "lib/rubygems_plugin.rb", "require 'bundler/omg' ; puts 'FAIL'" end + + # Test comlicated gem dependencies for install + build_gem "net_a" do |s| + s.add_dependency "net_b" + s.add_dependency "net_build_extensions" + s.write "lib/rubygems_plugin.rb", <<-R + require 'net_b' + require 'net_a' + R + end + + build_gem "net_b" do |s| + s.write "lib/rubygems_plugin.rb", <<-G + require 'net_b' + G + end + + build_gem "net_build_extensions" do |s| + s.add_dependency "rake" + s.extensions << "Rakefile" + s.write "Rakefile", <<-RUBY + task :default do + path = File.expand_path("../lib", __FILE__) + FileUtils.mkdir_p(path) + File.open("\#{path}/net_build_extensions.rb", "w") do |f| + f.puts "NET_BUILD_EXTENSIONS = 'YES'" + end + end + RUBY + end + + build_gem "net_c" do |s| + s.add_dependency "net_a" + s.add_dependency "net_d" + s.write "lib/rubygems_plugin.rb", <<-G + require 'net_a' + require 'net_d' + require 'net_c' + G + end + + build_gem "net_d" do |s| + s.write "lib/rubygems_plugin.rb", <<-G + require 'net_d' + G + end + + build_gem "net_e" do |s| + s.add_dependency "net_d" + s.write "lib/rubygems_plugin.rb", <<-G + require 'net_d' + G + end end end @@ -275,7 +328,7 @@ module Spec @spec.send(*args, &blk) end - def write(file, source) + def write(file, source = "") @files[file] = source end |