Skip to content

Commit

Permalink
[Specification] Add a spec for traverse only considering runtime depe…
Browse files Browse the repository at this point in the history
…ndencies
  • Loading branch information
segiddins committed Nov 18, 2015
1 parent 5ee10d1 commit 6d11f3e
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions test/rubygems/test_require.rb
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,21 @@ def test_require_works_after_cleanup
assert_equal %w(a-1.0 b-2.0), loaded_spec_names
end

def test_require_doesnt_traverse_development_dependencies
a = new_spec("a", "1", nil, "lib/a.rb")
z = new_spec("z", "1", "w" => "> 0")
w1 = new_spec("w", "1") { |s| s.add_development_dependency "non-existent" }
w2 = new_spec("w", "2") { |s| s.add_development_dependency "non-existent" }

install_specs a, w1, w2, z

assert gem("z")
assert_equal %w(z-1), loaded_spec_names
assert_equal ["w (> 0)"], unresolved_names

assert require("a")
end

def test_default_gem_only
default_gem_spec = new_default_spec("default", "2.0.0.0",
nil, "default/gem.rb")
Expand Down

0 comments on commit 6d11f3e

Please sign in to comment.