Sha256: c9720bc715ed802dee5dea63674df591d69456deac8e2f8c775d60cd8d84654f

Contents?: true

Size: 841 Bytes

Versions: 13

Compression:

Stored size: 841 Bytes

Contents

require File.expand_path( 'spec_helper', File.dirname( __FILE__ ) )
require 'maven/tools/pom'

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 )
      it "should convert #{dir}" do
        pom = Maven::Tools::POM.new( dir )
        file = File.join( dir, 'pom.xml' )
        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.to_s.gsub( /#{File.expand_path( dir )}\//, '' ).must_equal pom_xml
      end
    end
  end

end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
maven-tools-1.0.8 spec/pom_spec.rb
maven-tools-1.0.7 spec/pom_spec.rb
maven-tools-1.0.6 spec/pom_spec.rb
maven-tools-1.0.5 spec/pom_spec.rb
maven-tools-1.0.4 spec/pom_spec.rb
maven-tools-1.0.3 spec/pom_spec.rb
maven-tools-1.0.2 spec/pom_spec.rb
maven-tools-1.0.1 spec/pom_spec.rb
maven-tools-1.0.0 spec/pom_spec.rb
maven-tools-1.0.0.rc6 spec/pom_spec.rb
maven-tools-1.0.0.rc5 spec/pom_spec.rb
maven-tools-1.0.0.rc4 spec/pom_spec.rb
maven-tools-1.0.0.rc3 spec/pom_spec.rb