Sha256: 491eb2f3f9c9ea135eed213f58e34f389578c7dfa102c5330af664c8f26e0d7c
Contents?: true
Size: 1.42 KB
Versions: 7
Compression:
Stored size: 1.42 KB
Contents
require File.expand_path('../gemutilities', __FILE__) require 'rubygems' require 'rubygems/package_task' class TestGemPackageTask < RubyGemTestCase def test_gem_package gem = Gem::Specification.new do |g| g.name = "pkgr" g.version = "1.2.3" g.files = Rake::FileList["x"].resolve end pkg = Gem::PackageTask.new(gem) do |p| p.package_files << "y" end assert_equal ["x", "y"], pkg.package_files end def test_gem_package_with_current_platform gem = Gem::Specification.new do |g| g.name = "pkgr" g.version = "1.2.3" g.files = Rake::FileList["x"].resolve g.platform = Gem::Platform::CURRENT end pkg = Gem::PackageTask.new(gem) do |p| p.package_files << "y" end assert_equal ["x", "y"], pkg.package_files end def test_gem_package_with_ruby_platform gem = Gem::Specification.new do |g| g.name = "pkgr" g.version = "1.2.3" g.files = Rake::FileList["x"].resolve g.platform = Gem::Platform::RUBY end pkg = Gem::PackageTask.new(gem) do |p| p.package_files << "y" end assert_equal ["x", "y"], pkg.package_files end def test_package_dir_path gem = Gem::Specification.new do |g| g.name = 'nokogiri' g.version = '1.5.0' g.platform = 'java' end pkg = Gem::PackageTask.new gem pkg.define assert_equal 'pkg/nokogiri-1.5.0-java', pkg.package_dir_path end end
Version data entries
7 entries across 7 versions & 1 rubygems