spec/resolver_spec.rb in buildr-resolver-0.4.2 vs spec/resolver_spec.rb in buildr-resolver-0.4.3
- old
+ new
@@ -56,10 +56,21 @@
xml = IO.read( 'tmp/pom.xml' )
xml.should match /.+ch.qos.logback<\/groupId>\s+<artifactId>logback-core<\/artifactId>\s+<version>0.9.24.+/
xml.should match /.+org.slf4j<\/groupId>\s+<artifactId>slf4j-api<\/artifactId>\s+<version>1.6.0.+/
end
+
+ it "should get dependencies from a pom" do
+ Buildr::Resolver.resolve( ['ch.qos.logback:logback-classic:jar:0.9.24'] )
+ Buildr::Resolver.write_pom( "buildr-resolver:buildr-resolver:jar:45.45", "tmp/pom.xml" )
+ File.exists?( 'tmp/pom.xml' ).should be_true
+
+ deps = Buildr::Resolver.deps_from_pom( 'tmp/pom.xml' )
+
+ deps.should eql ["ch.qos.logback:logback-classic:jar:0.9.24", "ch.qos.logback:logback-core:jar:0.9.24", "org.slf4j:slf4j-api:jar:1.6.0"]
+
+ end
it "should install a pom" do
if File.exists?( "#{Buildr::Resolver.naether.local_repo_path}buildr-resolver/11.11/buildr-resolver-11.11.jar" )
File.delete("#{Buildr::Resolver.naether.local_repo_path}buildr-resolver/11.11/buildr-resolver-11.11.jar")
end
@@ -69,6 +80,6 @@
Buildr::Resolver.install_artifact( "buildr-resolver:buildr-resolver:jar:11.11", Naether::Bootstrap.naether_jar, {:pom_path => "tmp/pom.xml"} )
File.exists?( "#{Buildr::Resolver.naether.local_repo_path}/buildr-resolver/11.11/buildr-resolver-11.11.jar" )
end
end
-end
\ No newline at end of file
+end