Sha256: 66071486965e815a9a56feb18d3901ed996231dbdccf10edbc3807de1e36ecb0

Contents?: true

Size: 852 Bytes

Versions: 13

Compression:

Stored size: 852 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe 'isolated environment', :isolated_environment do
  include FileHelper

  let(:cli) { RuboCop::CLI.new }

  before(:each) { $stdout = StringIO.new }
  after(:each) { $stdout = STDOUT }

  # Configuration files above the work directory shall not disturb the
  # tests. This is especially important on Windows where the temporary
  # directory is under the user's home directory. On any platform we don't want
  # a .rubocop.yml file in the temporary directory to affect the outcome of
  # rspec.
  it 'is not affected by a config file above the work directory' do
    create_file('../.rubocop.yml', ['inherit_from: missing_file.yml'])
    create_file('ex.rb', ['# encoding: utf-8'])
    # A return value of 0 means that the erroneous config file was not read.
    expect(cli.run([])).to eq(0)
  end
end

Version data entries

13 entries across 13 versions & 2 rubygems

Version Path
rubyjobbuilderdsl-0.0.2 vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/isolated_environment_spec.rb
rubyjobbuilderdsl-0.0.1 vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/isolated_environment_spec.rb
rubocop-0.29.1 spec/isolated_environment_spec.rb
rubocop-0.29.0 spec/isolated_environment_spec.rb
rubocop-0.28.0 spec/isolated_environment_spec.rb
rubocop-0.27.1 spec/isolated_environment_spec.rb
rubocop-0.27.0 spec/isolated_environment_spec.rb
rubocop-0.26.1 spec/isolated_environment_spec.rb
rubocop-0.26.0 spec/isolated_environment_spec.rb
rubocop-0.25.0 spec/isolated_environment_spec.rb
rubocop-0.24.1 spec/isolated_environment_spec.rb
rubocop-0.24.0 spec/isolated_environment_spec.rb
rubocop-0.23.0 spec/isolated_environment_spec.rb