HttpspecSimple
RSpec extension for HTTP request
Usage
require 'httpspec_simple'
base_url 'http://kozy4324.github.io'
describe request('/') do
it { should be_http_ok }
it { should respond_within(2).seconds }
end
describe request('/blog/archives/') do
it { should be_http_ok }
it { should respond_within(2).seconds }
end
Custom matcher
be_http_ok
Example passes if response is 200 ok
resond_within(n).seconds
Example passes if response time is less than n seconds
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create new Pull Request