From 9eab435631e1b0a659126d068972ee88cff160de Mon Sep 17 00:00:00 2001 From: "J.D. Hollis" Date: Tue, 30 Jun 2009 08:58:35 -0400 Subject: Only check for built extensions on gem dependencies that are in vendor/gems. [#2825 state:resolved] Signed-off-by: Yehuda Katz + Carl Lerche --- railties/test/gem_dependency_test.rb | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'railties/test/gem_dependency_test.rb') diff --git a/railties/test/gem_dependency_test.rb b/railties/test/gem_dependency_test.rb index 70f4496685..92132be992 100644 --- a/railties/test/gem_dependency_test.rb +++ b/railties/test/gem_dependency_test.rb @@ -199,6 +199,15 @@ class GemDependencyTest < Test::Unit::TestCase assert_equal true, Rails::GemDependency.new("dummy-gem-i").built? assert_equal false, Rails::GemDependency.new("dummy-gem-j").built? end + + def test_gem_determines_build_status_only_on_vendor_gems + framework_gem = Rails::GemDependency.new('dummy-framework-gem') + framework_gem.stubs(:framework_gem?).returns(true) # already loaded + framework_gem.stubs(:vendor_rails?).returns(false) # but not in vendor/rails + framework_gem.stubs(:vendor_gem?).returns(false) # and not in vendor/gems + framework_gem.add_load_paths # freeze framework gem early + assert framework_gem.built? + end def test_gem_build_passes_options_to_dependencies start_gem = Rails::GemDependency.new("dummy-gem-g") -- cgit v1.2.3