Permalink
Browse files

Verify currency exchange API contract

  • Loading branch information...
1 parent b6a0332 commit 19c7eab406a6fcd10495aac9752931204fbc212d @vivekjain10 vivekjain10 committed Jun 19, 2013
Showing with 13 additions and 0 deletions.
  1. +1 −0 .travis.yml
  2. +12 −0 contracts/rate-exchange.jns
  3. BIN tools/janus.jar
View
@@ -2,3 +2,4 @@ language: ruby
rvm: 1.9.3
script:
- bundle exec rake test:rspec test:features:travis
+ - java -jar tools/janus.jar --verify contracts/rate-exchange.jns | grep "(0 failed)"
@@ -0,0 +1,12 @@
+(service
+ "Rate Exchange"
+
+ (contract "Get currency exchange rate"
+ (method :get)
+ (url "http://rate-exchange.appspot.com/currency?from=USD&to=INR")
+
+ (should-have :path "$.to" :equal-to "INR")
+ (should-have :path "$.from" :equal-to "USD")
+ (should-have :path "$.rate" :of-type :number)
+ )
+)
View
Binary file not shown.

0 comments on commit 19c7eab

Please sign in to comment.