Skip to content

Instantly share code, notes, and snippets.

@jarib
Created August 19, 2009 08:10
Show Gist options
  • Save jarib/170240 to your computer and use it in GitHub Desktop.
Save jarib/170240 to your computer and use it in GitHub Desktop.
include QA::SimpleTester::Delegator
set :data_source , RestDataSource.new(ARGV.dup)
set :output_format, :text
set :title , "Rest Test"
desc 'HTTP header has correct Content-Type'
expect { |rest| rest.headers.content_type }.to_be 'application/xml'
desc 'XML is well formed'
expect { |rest| rest.xml.well_formed? }.to_be true
desc 'XML has correct Content-Encoding'
expect { |rest| rest.headers.content_encoding }.to_be "UTF-8"
desc 'XML declaration has correct encoding'
expect { |rest| rest.xml.declaration_encoding }.to_be "UTF-8"
QA::SimpleTester.run!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment