Mock out clj-http with style
Clojure
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
resources/cassettes
src/betamax
test/betamax/test
.gitignore
.travis.yml
README.md
project.clj

README.md

betamax

Build Status

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