Sha256: f56358f952831c00f9926ceb82d9535fc4d409b79ec121fdd0fd5bb1b65c7a7a

Contents?: true

Size: 1.23 KB

Versions: 5

Compression:

Stored size: 1.23 KB

Contents

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

describe Maven::Ruby::Maven do

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

  let(:pkg) { File.expand_path("../pkg", __dir__) }

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

  it 'takes declared jruby version' do
    begin
      subject.inherit_jruby_version '9.0.4.0'
      out, _ = capture_subprocess_io do
        subject.exec( '-X', 'initialize')
      end
      _(out).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
      out, _ = capture_subprocess_io do
        subject.exec( '-X', 'initialize')
      end
      _(out).must_match /resolve jruby for version #{JRUBY_VERSION}/
    end
  else
    it 'takes default jruby version with inherit jruby version' do
      subject.inherit_jruby_version
      out, _ = capture_subprocess_io do
        subject.exec( '-X', 'initialize')
      end
      _(out).must_match /resolve jruby for version 9.3.1.0/
    end
  end
 end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
ruby-maven-3.9.2 spec/maven_ruby_maven_spec.rb
ruby-maven-3.9.1 spec/maven_ruby_maven_spec.rb
ruby-maven-3.9.0 spec/maven_ruby_maven_spec.rb
ruby-maven-3.9.0.pre1 spec/maven_ruby_maven_spec.rb
ruby-maven-3.3.13 spec/maven_ruby_maven_spec.rb