Skip to content
This repository
  • 21 commits
  • 29 files changed
  • 0 comments
  • 2 contributors
Sep 12, 2012
Jason Draper drapergeek WIP: start using composite pattern. fd16caa
Gabe Berke-Williams gabebw Add tests for CompositeMatcher. 531e056
Jason Draper drapergeek move with message matcher into seperate file and fix issue with nil m…
…essage
0cd6d0a
Jason Draper drapergeek WIP: refactor shoulda matchers 1f6d368
Jason Draper drapergeek WIP: refactor shoulda matchers 7008717
Gabe Berke-Williams gabebw A bit of cleanup. 2ab8420
Jason Draper drapergeek fix a few broken tests after changing the design of CompositeMatcher 00bca1c
Gabe Berke-Williams gabebw Allow bundler 1.2.0.pre. f191aa2
Gabe Berke-Williams gabebw Refer to fully-qualified class name. d056604
Gabe Berke-Williams gabebw Whitespace. aabbf75
Gabe Berke-Williams gabebw Test for the correct thing. 935bc93
Gabe Berke-Williams gabebw Test pretty_error_messages. c5c3e7d
Gabe Berke-Williams gabebw Typo. 3f89d06
Gabe Berke-Williams gabebw Correctly disambiguate class name. 85ea3c9
Gabe Berke-Williams gabebw Passing tests for WithMessageMatcher. 7644856
Gabe Berke-Williams gabebw All specs passing. Cucumber fails. ea317eb
Gabe Berke-Williams gabebw Ensure generation of test rails app succeeds. 92658bc
Gabe Berke-Williams gabebw WIP-WIP-WIP: extract formatted error message to a third class
Currently Dis/allowValueMatcher uses the mixed-in pretty_error_messages method.
Since DisallowValueMatcher isn't a perfect logical inverse of AllowValueMatcher,
we need to have a third class that handles error messages for us.

Future thoughts:

Have a PositiveErrorDescription and a NegativeErrorDescription, which will
compose FormattedErrorMessageList into a "Did not expect errors, got errors: "
vs "Expected errors, got no errors". Idea: one of them can decorate the other
and return the other's negative message as its positive message and vice versa.
93655aa
Gabe Berke-Williams gabebw WIP: Positive error description
Currently AllowValueMatcher has a commented-out example usage, which should be
uncommented when this is ready.

Ideally the `if expected_message` nil-check in AllowValueMatcher will be handled
by PositiveErrorDescription too.

Use it in FormattedErrorDescription as well.

We use PositiveErrorDescription#matches? and #matched_error to grab the
description and return the correct thing in FormattedErrorDescription. I
envision FormattedErrorDescription being used in AllowValueMatcher too, probably
with a #matches? method too that delegates.
9d24782
Jason Draper drapergeek WIP: Fix positve error description spec issues and add method for mat…
…ched_error.
94a0cbd
Jason Draper drapergeek Set the value for the failing attribute 06e4192