Skip to content

Commit

Permalink
Merge pull request #4 from elskwid/update-readme
Browse files Browse the repository at this point in the history
Update README and inline documentation for Minitest 5
  • Loading branch information
wojtekmach committed Oct 8, 2013
2 parents b0dad90 + a8f238e commit cdd804d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions README.md
Expand Up @@ -26,7 +26,7 @@ For use with Rails check out (ValidAttribute + Capybara):

* Enables you to use existing matcher classes from projects like
valid\_attribute and capybara
* Can be used both in MiniTest::Unit::TestCase & MiniTest::Spec
* Can be used both in Minitest::Test & Minitest::Spec

## Synopsis

Expand All @@ -46,7 +46,7 @@ end

# Using minitest/unit

class PostTest < MiniTest::Unit::TestCase
class PostTest < Minitest::Test
include ValidAttribute::Method

def test_validations
Expand Down Expand Up @@ -93,8 +93,8 @@ You can also register matcher so that it works similar to built-in
assertions and expectations. Note subject must be the first argument in assertion.

```ruby
MiniTest::Unit::TestCase.register_matcher HaveContent, :have_content
MiniTest::Unit::TestCase.register_matcher :have_selector, :have_selector
Minitest::Test.register_matcher HaveContent, :have_content
Minitest::Test.register_matcher :have_selector, :have_selector

assert_have_content page, "Hello"
assert_have_selector page, :xpath, "//table/tr"
Expand All @@ -105,7 +105,7 @@ page.must_have_selector :xpath, "//table/tr"

## Requirements

* `minitest >= 2.7.0`
* `minitest ~> 5.0`

## Install

Expand Down
4 changes: 2 additions & 2 deletions lib/minitest/matchers.rb
Expand Up @@ -144,9 +144,9 @@ class Minitest::Test
# # ...
# end
#
# Minitest::Unit::TestCase.register_matcher HaveContent, :have_content
# Minitest::Test.register_matcher HaveContent, :have_content
#
# class MyTest < Test::Unit::TestCase
# class MyTest < Minitest::Test
# def test_index
# visit "/"
# assert_have_content page, "Hello"
Expand Down

0 comments on commit cdd804d

Please sign in to comment.