/betamax

Mock out clj-http with style

Primary LanguageDIGITAL Command Language

betamax

This project is abandoned

Mock out clj-http with style. Works just like VCR.

Usage

Put the following in test_helper.clj and use it in all your test namespaces:

(betamax/configure "fixtures/betamax_cassettes")

To test using Midje:

(deftest something
  (betamax/with-cassette "example-domains"
    (fact (:body (clj-http.client/get "http://www.iana.org/domains/example/")) =>
          #"Example Domains")))

Submitting a pull request

  1. Fork the project
  2. Create a topic branch
  3. Implement the feature or fix the bug
  4. Add documentation for the feature or bug
  5. Add tests for the feature or bug
  6. Run the test suite to ensure you haven't broken anything
  7. Commit and push the changes
  8. Submit a pull request. Please do not include changes to the project.clj, version or history file.

License

Copyright (C) 2012 Will Roe

Released under the MIT License: http://www.opensource.org/licenses/mit-license.php