Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extracting EncodedString specs from #134 #151

Merged
merged 9 commits into from
Jan 23, 2015

Commits on Jan 15, 2015

  1. Test EncodedString for more undefined conversion / invalid byte sequence

    - Add tests for EncodedString#to_s, #split, #<<
    - For each Encoding failure
      - assert the expected failure is raised o a String, but not on an 'EncodedString'
      - assert invalid bytes or unconvertale characters are replaced
    
    Currently one test is failing (pending)
      -  EncodedString#split when the string has an invalid byte sequence
       incorrectly raises an ArgumentError
    
    Use 'expect_identical_string' to avoid running expectation failures
    through the differ, which also uses EncodingString
    bf4 committed Jan 15, 2015
    Configuration menu
    Copy the full SHA
    19e967a View commit details
    Browse the repository at this point in the history
  2. Add be_identical_string matcher

    bf4 committed Jan 15, 2015
    Configuration menu
    Copy the full SHA
    e3231f4 View commit details
    Browse the repository at this point in the history
  3. Correct inaccurate comment.

    It’s actually not quite the hot spot it says it here.
    
    Encoded strings are only created when an expectation fails
    that uses a diffable matcher.  I believe that expectations normally
    pass (since people usually try to keep their test suite green
    and only have a small number of failing specs at a time), so encoded
    strings are not created by every expectation.
    myronmarston authored and bf4 committed Jan 15, 2015
    Configuration menu
    Copy the full SHA
    d159096 View commit details
    Browse the repository at this point in the history
  4. Make comments more clear.

    These cases are contrasts (as one example raises the
    error, but the other does not), so using `and` was
    confusing since they don’t do the same thing. `vs`
    makes more sense.
    myronmarston authored and bf4 committed Jan 15, 2015
    Configuration menu
    Copy the full SHA
    012e558 View commit details
    Browse the repository at this point in the history
  5. Refactor encoding helpers into a custom matcher.

    This reads better, provides better failure output, and is composable.
    myronmarston authored and bf4 committed Jan 15, 2015
    Configuration menu
    Copy the full SHA
    0b61339 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    494e3e7 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    d7c1885 View commit details
    Browse the repository at this point in the history
  8. Clarify string << spec

    bf4 committed Jan 15, 2015
    Configuration menu
    Copy the full SHA
    9a13068 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    9eeedb9 View commit details
    Browse the repository at this point in the history