kschiess / parslet

A small PEG based parser library. See the Hacking page in the Wiki as well.
kschiess.github.com/parslet
MIT License
805 stars 95 forks source link

Update matcher protocol in parslet/rig/rspec #99

Closed skalee closed 10 years ago

skalee commented 10 years ago

http://myronmars.to/n/dev-blog/2014/02/rspec-2-99-and-3-0-beta-2-have-been-released

Update matcher protocol and custom matcher DSL to better align with the newer expect syntax. If you want your matchers to maintain compatibility with multiple versions of RSpec, you can alias the new names to the old. (Myron Marston)

  • failure_message_for_should => failure_message
  • failure_message_for_should_not => failure_message_when_negated
  • match_for_should => match
  • match_for_should_not => match_when_negated

Sorry, no tests for RSpec 3 integration. I'm eager to add them but I'm unsure how.

It's possible to check in two gemfiles with different Rspec versions into project and so that Travis runs against both of them. Example. But maybe that's overkill? It makes tests 2x longer (they're pretty quick, though). Capybara supports both RSpec versions, but CI checks it against 2.x only.