Skip to content

Commit

Permalink
add test-unit gem
Browse files Browse the repository at this point in the history
format item_search.xml fixture
fix warning in test spec
  • Loading branch information
jugend committed Jun 29, 2016
1 parent 0196ea5 commit ca2d107
Show file tree
Hide file tree
Showing 4 changed files with 4,948 additions and 6 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Gemfile.lock
*.gem
*.log
3 changes: 2 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ source 'http://rubygems.org'

gem 'nokogiri', '~> 1.4'
gem 'ruby-hmac', '~> 0.3'
gem 'test-unit'

group :dev do
gem 'rake'
end
end
8 changes: 4 additions & 4 deletions test/amazon/ecs_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ def test_utf8_encoding
assert resp.is_valid_request?,
"Not a valid request"
item = resp.first_item
assert_no_match /\A&#x.*/, item.get_unescaped("//FormattedPrice"),
"£ sign converted to ASCII from UTF-8"
assert_no_match(/\A&#x.*/, item.get_unescaped("//FormattedPrice"),
"£ sign converted to ASCII from UTF-8")
end

def test_item_search_by_author
Expand Down Expand Up @@ -133,8 +133,8 @@ def test_item_lookup_with_no_result
resp = Amazon::Ecs.item_lookup('abc')
assert resp.is_valid_request?,
"Not a valid request"
assert_match /ABC is not a valid value for ItemId/, resp.error,
"Error Message for lookup of ASIN = ABC different from expected"
assert_match(/ABC is not a valid value for ItemId/, resp.error,
"Error Message for lookup of ASIN = ABC different from expected")
end

def test_get_elements
Expand Down
4,940 changes: 4,939 additions & 1 deletion test/fixtures/item_search.xml

Large diffs are not rendered by default.

0 comments on commit ca2d107

Please sign in to comment.