-
-
Notifications
You must be signed in to change notification settings - Fork 102
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
Test Differ#pick_encoding; move to EncodedString #167
Conversation
@@ -7,6 +7,7 @@ module RSpec | |||
module Support | |||
# rubocop:disable ClassLength | |||
class Differ | |||
LINE_BREAK = "\n" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the reasoning behind this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, as I commented in bf4@ce333af I was thinking of using LINE_BREAK
as a way to get the __ENCODING__
of strings generated in differ.rb
, that also happened to be a nice cleanup of string generation. Turns out it didn't work like I thought it did, so, the only reason to keep it now is cleanup, if you like. I'm going to try again with a less aggressive strategy.
Well, the tests all pass now. I'm thinking of simplifying this PR to
Then, in another PR, per any discussion in this one, change the tests in the Then, with better test coverage, I'll return to the original exception that started all this, an |
Since I'm going to revise this PR a bit, I thought I might as well push the ArgumentError on EncodingString#split fix for a preview of what it is, though it would go into a subsequent PR. |
# HACK: To disable the encoding check | ||
chain :without_encoding do | ||
@without_encoding = :without_encoding | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
re: the hack here and below, I'm wondering if I should change the name of the matcher to expect_identical_encoded_string
and expect_identical_string
and see if there are still any cases for chaining
I want to keep this moving, so I've reduced this PR to just the Differ/EncodedString#pick_encoding |
Test Differ#pick_encoding; move to EncodedString
Thanks @bf4 |
(Note @myronmarston I haven't added a change log because this is pretty much just an internal refactoring) |
Followup to #151
especially see #134 (comment)