antonmi / espec

Elixir Behaviour Driven Development
Other
808 stars 62 forks source link

Feature - Implement `match_pattern` assertion #236

Closed sascha-wolf closed 7 years ago

sascha-wolf commented 7 years ago

As discussed in #232 this PR implements a new matcher called MatchPattern and can be used like this:

expect actual |> to(match_pattern {:ok, _})

It is possible to use ^pinned_variables but not to call functions in the match, which is consistent with elixirs match behaviour.


The README was updated with a new Pattern section.

antonmi commented 7 years ago

Awesome work, @Zeeker ! Thank you!