forked from sulleh/alexa
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
parse response error using multi xml
- Loading branch information
Showing
7 changed files
with
44 additions
and
9 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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
pkg/* | ||
tmp/ | ||
*.gem | ||
.bundle | ||
Gemfile.lock |
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
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
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
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,7 @@ | ||
HTTP/1.1 401 Unauthorized | ||
Server: Apache-Coyote/1.1 | ||
Transfer-Encoding: chunked | ||
Date: Tue, 11 Oct 2011 20:16:19 GMT | ||
|
||
<?xml version="1.0"?> | ||
<Response><Errors><Error><Code>AuthFailure</Code><Message>AWS was not able to authenticate the request: access credentials are missing</Message></Error></Errors><RequestID>57d5192f-803a-1d6f-a50a-c354840a02b9</RequestID></Response> |
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,11 +1,24 @@ | ||
Bundler.setup | ||
require "bundler/setup" | ||
|
||
require "minitest/autorun" | ||
require "fakeweb" | ||
require "mocha" | ||
|
||
require "alexa" | ||
|
||
def fixture_file(filename) | ||
file_path = File.expand_path(File.dirname(__FILE__) + '/fixtures/' + filename) | ||
File.read(file_path) | ||
class MiniTest::Unit::TestCase | ||
def setup | ||
FakeWeb.allow_net_connect = false | ||
end | ||
|
||
def fixture_xml(filename) | ||
file_path = File.expand_path(File.dirname(__FILE__) + '/fixtures/' + filename) | ||
File.read(file_path) | ||
end | ||
|
||
# Recording response is as simple as writing in terminal: | ||
# curl -is "http://awis.amazonaws.com/?Action=UrlInfo&AWSAccessKeyId=fake" -X GET > response.txt | ||
def fixture(filename) | ||
File.read(File.join("test", "fixtures", filename)) | ||
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