Sha256: eb7d675e6058d9d8186cff75fddfffdf3ba55381d7f836c207595305dd15e28c

Contents?: true

Size: 725 Bytes

Versions: 55

Compression:

Stored size: 725 Bytes

Contents

require 'spec_helper'
require 'fileutils'
require 'digest'

describe Travis::CLI::EncryptFile do
  CMD_TARGET = 'README.md'

  before :each do
    Digest.stub(:hexencode).and_return "randomhex" # to avoid relying on Dir.pwd value for hex
  end

  after :each do
    FileUtils.rm_f "#{CMD_TARGET}.enc"
  end

  example "travis encrypt-file #{CMD_TARGET}" do
    run_cli('encrypt-file', CMD_TARGET).should be_success
    File.exists?("#{CMD_TARGET}.enc").should be true
  end

  example "travis encrypt-file #{CMD_TARGET} -a" do
    run_cli('encrypt-file', CMD_TARGET, '-a') { |i| i.puts "n" }.should be_success
    stdout.should match /Overwrite the config file/
    File.exists?("#{CMD_TARGET}.enc").should be true
  end
end

Version data entries

55 entries across 55 versions & 1 rubygems

Version Path
travis-1.11.1 spec/cli/encrypt_file_spec.rb
travis-1.11.0 spec/cli/encrypt_file_spec.rb
travis-1.10.1.travis.1341.9 spec/cli/encrypt_file_spec.rb
travis-1.10.1.travis.1321.9 spec/cli/encrypt_file_spec.rb
travis-1.10.1.travis.1312.9 spec/cli/encrypt_file_spec.rb
travis-1.10.1.travis.1311.9 spec/cli/encrypt_file_spec.rb
travis-1.10.1.travis.1305.9 spec/cli/encrypt_file_spec.rb
travis-1.10.0 spec/cli/encrypt_file_spec.rb
travis-1.9.2.travis.1304.9 spec/cli/encrypt_file_spec.rb
travis-1.9.2.travis.1303.9 spec/cli/encrypt_file_spec.rb
travis-1.10.0.pre.rc4 spec/cli/encrypt_file_spec.rb
travis-1.10.0.pre.rc3 spec/cli/encrypt_file_spec.rb
travis-1.10.0.pre.rc2 spec/cli/encrypt_file_spec.rb
travis-1.9.2.travis.1288.9 spec/cli/encrypt_file_spec.rb
travis-1.9.2.travis.1285.9 spec/cli/encrypt_file_spec.rb
travis-1.9.2.travis.1279.9 spec/cli/encrypt_file_spec.rb
travis-1.10.0.pre.rc1 spec/cli/encrypt_file_spec.rb
travis-1.9.2.travis.1254.9 spec/cli/encrypt_file_spec.rb
travis-1.9.2.travis.1236.9 spec/cli/encrypt_file_spec.rb
travis-1.9.2.travis.1224.9 spec/cli/encrypt_file_spec.rb