Sha256: a842d5abf3d421538d1bc064b75cffbabaa28a087d764592b735161099b0b90e

Contents?: true

Size: 744 Bytes

Versions: 59

Compression:

Stored size: 744 Bytes

Contents

describe KnapsackPro::Config::TempFiles do
  describe 'TEMP_DIRECTORY_PATH' do
    subject { described_class::TEMP_DIRECTORY_PATH }

    it 'returns temporary directory path' do
      expect(subject).to eq '.knapsack_pro'
    end
  end

  describe '.ensure_temp_directory_exists!', :clear_tmp do
    let(:gitignore_file_path) { '.knapsack_pro/.gitignore' }

    subject { described_class.ensure_temp_directory_exists! }

    it 'creates .gitignore file' do
      expect { subject }.to change { File.exist?(gitignore_file_path) }.from(false).to(true)
    end

    it '.gitignore file has correct content to ignore all files in temporary directory' do
      subject

      expect(File.read(gitignore_file_path)).to match /^\*$/
    end
  end
end

Version data entries

59 entries across 59 versions & 1 rubygems

Version Path
knapsack_pro-7.13.1 spec/knapsack_pro/config/temp_files_spec.rb
knapsack_pro-7.13.0 spec/knapsack_pro/config/temp_files_spec.rb
knapsack_pro-7.12.1 spec/knapsack_pro/config/temp_files_spec.rb
knapsack_pro-7.12.0 spec/knapsack_pro/config/temp_files_spec.rb
knapsack_pro-7.11.0 spec/knapsack_pro/config/temp_files_spec.rb
knapsack_pro-7.10.0 spec/knapsack_pro/config/temp_files_spec.rb
knapsack_pro-7.9.0 spec/knapsack_pro/config/temp_files_spec.rb
knapsack_pro-7.8.2 spec/knapsack_pro/config/temp_files_spec.rb
knapsack_pro-7.8.1 spec/knapsack_pro/config/temp_files_spec.rb
knapsack_pro-7.8.0 spec/knapsack_pro/config/temp_files_spec.rb
knapsack_pro-7.7.0 spec/knapsack_pro/config/temp_files_spec.rb
knapsack_pro-7.6.2 spec/knapsack_pro/config/temp_files_spec.rb
knapsack_pro-7.6.1 spec/knapsack_pro/config/temp_files_spec.rb
knapsack_pro-7.6.0 spec/knapsack_pro/config/temp_files_spec.rb
knapsack_pro-7.1.0 spec/knapsack_pro/config/temp_files_spec.rb
knapsack_pro-7.0.1 spec/knapsack_pro/config/temp_files_spec.rb
knapsack_pro-7.0.0 spec/knapsack_pro/config/temp_files_spec.rb
knapsack_pro-6.0.4 spec/knapsack_pro/config/temp_files_spec.rb
knapsack_pro-6.0.3 spec/knapsack_pro/config/temp_files_spec.rb
knapsack_pro-6.0.2 spec/knapsack_pro/config/temp_files_spec.rb