-
Notifications
You must be signed in to change notification settings - Fork 409
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FakeAPI is stubbed to satisfy a very small number of calls that `encrypt-file` command requires.
- Loading branch information
Showing
2 changed files
with
70 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
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 | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters