Created
December 23, 2011 03:28
-
-
Save johntdyer/1513036 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| describe "#download_file", fakefs: true do | |
| it "should download correct file" do | |
| FakeFS do | |
| FakeWeb.register_uri(:get, "http://hudson.voxeolabs.com/hudson/job/Rayo/700/artifact/rayo-war/target/rayo_b700.war", :body => "foo", :status=>["200","OK"]) | |
| Rayo.download_file(:resource=>"http://hudson.voxeolabs.com/hudson/job/Rayo/700/artifact/rayo-war/target/rayo_b700.war",:target=>'/tmp/rayo.war') | |
| end | |
| File.exists?('/tmp/rayo.war').should be_true | |
| File.read('/tmp/rayo.war').should == 'foo' | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment