require 'jbundler/pom'
describe JBundler::Pom do
it 'should create jar pom without deps' do
pom = JBundler::Pom.new("first", "1", [])
File.read(pom.file).must_equal "4.0.0ruby.bundlerfirst1"
pom.coordinate.must_equal "ruby.bundler:first:jar:1"
end
it 'should create pom-pom without deps' do
pom = JBundler::Pom.new("first", "1", [], 'pom')
File.read(pom.file).must_equal "4.0.0ruby.bundlerfirst1pom"
pom.coordinate.must_equal "ruby.bundler:first:pom:1"
end
it 'should create jar pom without deps' do
pom = JBundler::Pom.new("second", "1", ["jar \"org.jruby:jruby-core\", '~>1.7.0'"])
File.read(pom.file).must_equal "4.0.0ruby.bundlersecond1org.jrubyjruby-core[1.7.0,1.7.99999]"
pom.coordinate.must_equal "ruby.bundler:second:jar:1"
end
end