Skip to content
Use RSpec and Shoulda matchers in Test::Unit
Ruby
Latest commit 7c407e2 Sep 19, 2011 Alexander Kern Bump version.
Failed to load latest commit information.
lib Bump version. Sep 19, 2011
test Adds the functionality May 8, 2011
.gitignore Adds the functionality May 9, 2011
.travis.yml
.yardopts Adds the functionality May 9, 2011
Gemfile Adds matchbox gem template May 8, 2011
LICENSE Adds the functionality May 9, 2011
README.md Adds the functionality May 9, 2011
Rakefile Fixes the rake task name May 8, 2011
matchbox.gemspec

README.md

matchbox - use RSpec and Shoulda matchers in Test::Unit StillMaintained Status Build Status

Matchbox allows you to use RSpec and Shoulda matchers as regular, old Test::Unit assertions.

Installation

Without bundler:

gem install matchbox

With bundler:

gem 'matchbox'

Usage

Just include the RSpec matchers into the TestCase and they can be used as seen below. This example uses methods found in shoulda-matchers.

class PostTest < Test::Unit::TestCase
  def test_active_record_relations
    post = Post.new
    assert_accepts belong_to(:topic), post
  end
end

Note on Patches/Pull Requests

  • Fork the project.
  • Make your feature addition or bug fix.
  • Add tests for it. This is important so I don't break it in a future version unintentionally.
  • Commit, but do not mess with the Rakefile. If you want to have your own version, that is fine but bump the version in a commit by itself in another branch so I can ignore it when I pull.
  • Send me a pull request. Bonus points for git flow feature branches.

Resources

License

Matchbox is licensed under the MIT License. See LICENSE for details.

Something went wrong with that request. Please try again.