Sha256: 413364884a950d37634978c9fb25ce273f8115f732ed64d520e5b44c336a5d0b

Contents?: true

Size: 1.18 KB

Versions: 38

Compression:

Stored size: 1.18 KB

Contents

# frozen_string_literal: true

require 'avm/eac_ruby_base1/runners/base/rubocop'
require 'avm/eac_ruby_base1/sources/base'

::RSpec.describe ::Avm::EacRubyBase1::Runners::Base::Rubocop do
  let(:fixtures_root) { ::Pathname.new(__dir__).expand_path.join('rubocop_spec_files') }
  let(:dir1) { fixtures_root.join('dir1') }
  let(:dir2) { fixtures_root.join('dir2') }
  let(:dir3) { dir1.join('dir3') }
  let(:dir4) { fixtures_root.join('dir4') }

  {
    dir1: '0.48.1',
    dir2: ::Avm::EacRubyBase1::Sources::Base.new(::File.expand_path('../../../../../..', __dir__))
            .gemfile_lock_gem_version('rubocop').to_s,
    dir3: '0.48.1',
    dir4: '33.33.33'
  }.each do |dir_name, rubocop_version|
    context "when dir is #{dir_name}" do
      let(:dir) { send(dir_name) }
      let(:thegem) { ::Avm::EacRubyBase1::Sources::Base.new(dir) }

      before do
        thegem.bundle.system! if thegem.gemfile_path.exist?
      end

      it "return #{rubocop_version} as Rubocop version" do
        argv = ['-C', dir.to_s, '--', '--version']
        expect { described_class.run(argv: argv) }.to(
          output("#{rubocop_version}\n").to_stdout_from_any_process
        )
      end
    end
  end
end

Version data entries

38 entries across 38 versions & 1 rubygems

Version Path
eac_tools-0.47.1 sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/runners/base/rubocop_spec.rb
eac_tools-0.47.0 sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/runners/base/rubocop_spec.rb
eac_tools-0.46.0 sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/runners/base/rubocop_spec.rb
eac_tools-0.45.2 sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/runners/base/rubocop_spec.rb
eac_tools-0.45.1 sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/runners/base/rubocop_spec.rb
eac_tools-0.45.0 sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/runners/base/rubocop_spec.rb
eac_tools-0.44.0 sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/runners/base/rubocop_spec.rb
eac_tools-0.43.0 sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/runners/base/rubocop_spec.rb
eac_tools-0.42.0 sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/runners/base/rubocop_spec.rb
eac_tools-0.41.0 sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/runners/base/rubocop_spec.rb
eac_tools-0.40.0 sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/runners/base/rubocop_spec.rb
eac_tools-0.39.0 sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/runners/base/rubocop_spec.rb
eac_tools-0.38.0 sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/runners/base/rubocop_spec.rb
eac_tools-0.37.2 sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/runners/base/rubocop_spec.rb
eac_tools-0.37.1 sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/runners/base/rubocop_spec.rb
eac_tools-0.37.0 sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/runners/base/rubocop_spec.rb
eac_tools-0.36.1 sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/runners/base/rubocop_spec.rb
eac_tools-0.36.0 sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/runners/base/rubocop_spec.rb
eac_tools-0.35.0 sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/runners/base/rubocop_spec.rb
eac_tools-0.34.0 sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/runners/base/rubocop_spec.rb