mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[bundler/bundler] Extract a gemspec_dir
helper
https://github.com/bundler/bundler/commit/71a29e286a
This commit is contained in:
parent
a2d7c97a91
commit
08c58e3c0d
2 changed files with 5 additions and 2 deletions
|
@ -309,8 +309,7 @@ RSpec.describe "bundle gem" do
|
|||
end
|
||||
|
||||
it "sets a minimum ruby version" do
|
||||
gemspec_path = ruby_core? ? "../../../lib/bundler" : "../.."
|
||||
bundler_gemspec = Bundler::GemHelper.new(File.expand_path(gemspec_path, __dir__)).gemspec
|
||||
bundler_gemspec = Bundler::GemHelper.new(gemspec_dir).gemspec
|
||||
|
||||
expect(bundler_gemspec.required_ruby_version).to eq(generated_gemspec.required_ruby_version)
|
||||
end
|
||||
|
|
|
@ -13,6 +13,10 @@ module Spec
|
|||
@gemspec ||= root.join(ruby_core? ? "lib/bundler/bundler.gemspec" : "bundler.gemspec")
|
||||
end
|
||||
|
||||
def gemspec_dir
|
||||
@gemspec_dir ||= gemspec.parent
|
||||
end
|
||||
|
||||
def bindir
|
||||
@bindir ||= root.join(ruby_core? ? "libexec" : "exe")
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue