Sha256: 285ac49521c41dafb0a9565b0228902420263d19a9c17789e5af4bf9412dcc41

Contents?: true

Size: 1.17 KB

Versions: 55

Compression:

Stored size: 1.17 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') }

  before do
    ::Avm::EacRubyBase1::Sources::Base.new(dir3).bundle.execute!
  end

  {
    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) }

      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

55 entries across 55 versions & 1 rubygems

Version Path
eac_tools-0.79.0 sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/runners/base/rubocop_spec.rb
eac_tools-0.78.0 sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/runners/base/rubocop_spec.rb
eac_tools-0.77.1 sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/runners/base/rubocop_spec.rb
eac_tools-0.77.0 sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/runners/base/rubocop_spec.rb
eac_tools-0.76.1 sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/runners/base/rubocop_spec.rb
eac_tools-0.76.0 sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/runners/base/rubocop_spec.rb
eac_tools-0.75.2 sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/runners/base/rubocop_spec.rb
eac_tools-0.75.1 sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/runners/base/rubocop_spec.rb
eac_tools-0.75.0 sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/runners/base/rubocop_spec.rb
eac_tools-0.74.1 sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/runners/base/rubocop_spec.rb
eac_tools-0.74.0 sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/runners/base/rubocop_spec.rb
eac_tools-0.73.0 sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/runners/base/rubocop_spec.rb
eac_tools-0.72.0 sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/runners/base/rubocop_spec.rb
eac_tools-0.70.1 sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/runners/base/rubocop_spec.rb
eac_tools-0.70.0 sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/runners/base/rubocop_spec.rb
eac_tools-0.69.1 sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/runners/base/rubocop_spec.rb
eac_tools-0.69.0 sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/runners/base/rubocop_spec.rb
eac_tools-0.68.0 sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/runners/base/rubocop_spec.rb
eac_tools-0.67.1 sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/runners/base/rubocop_spec.rb
eac_tools-0.67.0 sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/runners/base/rubocop_spec.rb