Sha256: 813a05977e274989e6fe1b8be13b168cde87f978e5c6fd0f6da599e6c68da43e

Contents?: true

Size: 1.15 KB

Versions: 62

Compression:

Stored size: 1.15 KB

Contents

require_relative 'setup'
require 'maven/ruby/maven'

describe Maven::Ruby::Maven do

  subject { Maven::Ruby::Maven.new }

  it 'shows mvn commandline with verbose flag' do
    CatchStdout.exec do
      subject.exec( '-Dverbose', 'validate' )
    end
    subject.verbose = false
    CatchStdout.result.must_match /mvn -Dverbose validate/
  end

  it 'takes declared jruby version' do
    begin
      subject.inherit_jruby_version '9.0.4.0'
      subject.exec( '-X', 'initialize', '-l', 'pkg/log1.txt' )
      File.read('pkg/log1.txt').must_match /resolve jruby for version 9.0.4.0/
    ensure
      subject['jruby.version'] = nil
    end
  end

  if defined? JRUBY_VERSION
    it 'inherits jruby version' do
      subject.inherit_jruby_version
      subject.exec( '-X', 'initialize', '-l', 'pkg/log2.txt' )
      File.read('pkg/log2.txt').must_match /resolve jruby for version #{JRUBY_VERSION}/
    end
  else
    it 'takes default jruby version with inherit jruby version' do
      subject.inherit_jruby_version
      subject.exec( '-X', 'initialize', '-l', 'pkg/log3.txt' )
      File.read('pkg/log3.txt').must_match /resolve jruby for version 1.7.22/
    end
  end
 end

Version data entries

62 entries across 59 versions & 14 rubygems

Version Path
ruby-maven-3.3.10 spec/maven_ruby_maven_spec.rb
ruby-maven-3.3.9 spec/maven_ruby_maven_spec.rb