Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow tests to run without a network connection
- Loading branch information
1 parent
1fe35e2
commit 5631438
Showing
2 changed files
with
10 additions
and
1 deletion.
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 |
---|---|---|
@@ -1,4 +1,12 @@ | ||
When /^I download the file '([^']+)'/ do |url| | ||
unless ENV['REMOTE'] == 'true' | ||
sham_rack_app = ShamRack.at('s3.amazonaws.com').stub | ||
sham_rack_app.register_resource('/Monkey/testfile.txt', 'S3 Remote File', 'text/plain') | ||
end | ||
|
||
@uploader.download!(url) | ||
end | ||
|
||
unless ENV['REMOTE'] == 'true' | ||
ShamRack.unmount_all | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ | |
|
||
require 'spec' | ||
require 'carrierwave' | ||
require 'sham_rack' | ||
|
||
alias :running :lambda | ||
|
||
|