davejachimiak/minitest-spec-expect — pull request #3 by splattael (2013-05-17 09:03:55+00:00)
Title: Swap params for `match` expectation.

Before this fix running tests gives:

```
1) Error:
expect syntax#test_0023_supports wont_match as to_not_match:
TypeError: no implicit conversion of Regexp into String
(eval):8:in `wont_match'
(eval):3:in `to_not_match'
/opt/ps/devel/_private/minitest-spec-expect/spec/integration_spec.rb:100:in `block (2 levels) in '

2) Error:
expect syntax#test_0022_supports must_match as to_match:
TypeError: no implicit conversion of Regexp into String
(eval):8:in `must_match'
(eval):3:in `to_match'
/opt/ps/devel/_private/minitest-spec-expect/spec/integration_spec.rb:96:in `block (2 levels) in '
```

Reason:

```ruby
"fartfartfartfart".must_match(/(fart)*/)
```
works while
```ruby
/(fart)*/.must_match "fartfartfartfart"
```
fails.

See also
https://github.com/seattlerb/minitest/blob/54fd3982/test/minitest/test_minitest_spec.rb#L431-443