spec/pom_spec.rb in maven-tools-1.0.8 vs spec/pom_spec.rb in maven-tools-1.0.9
- old
+ new
@@ -1,7 +1,8 @@
require File.expand_path( 'spec_helper', File.dirname( __FILE__ ) )
require 'maven/tools/pom'
+require 'maven/tools/versions'
describe Maven::Tools::POM do
( Dir[ File.join( File.dirname( __FILE__ ), 'gem*' ) ] + Dir[ File.join( File.dirname( __FILE__ ), 'pom*' ) ] + Dir[ File.join( File.dirname( __FILE__ ), 'mavenfile*' ) ] ).each do |dir|
if File.directory?( dir )
@@ -11,9 +12,12 @@
file = File.join( File.dirname( dir ), 'pom.xml' ) unless File.exists? file
pom_xml = File.read( file )
pom_xml.sub!( /<!--(.|\n)*-->\n/, '' )
pom_xml.sub!( /<?.*?>\n/, '' )
pom_xml.sub!( /<project([^>]|\n)*>/, '<project>' )
+ pom_xml.gsub!( /io.tesla.polyglot/, 'io.takari.polyglot' )
+ pom_xml.gsub!( /tesla-polyglot/, 'polyglot' )
+ pom_xml.gsub!( /${tesla.version}/, Maven::Tools::VERSIONS[ :polyglot_version ] )
pom.to_s.gsub( /#{File.expand_path( dir )}\//, '' ).must_equal pom_xml
end
end
end