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

Support ellipsis wildcards #9

tfausak opened this Issue Aug 20, 2014 · 3 comments


None yet
2 participants
Copy link

tfausak commented Aug 20, 2014

Python's doctest has an ellipsis options. It's useful for removing parts of a test that aren't important or are known to change. For example, creating a new object:

>>> object() # doctest: +ELLIPSIS
<object object at 0x...>
    object() # doctest: +ELLIPSIS
    <object object at 0x...>

This test doesn't care what the actual memory address of the object is. As far as I can tell, there is no way to write a test like this with Ruby DocTest.

=> #<Object:0x...>
1.  FAIL | Default Test
           Got:      #<Object:0x007fc0b88c7c58>
           Expected: #<Object:0x...>

This comment has been minimized.

Copy link

tfausak commented Sep 2, 2014

It looks like normalize_result is supposed to handle this, but it's hard coded to only allow 8 hex digits.


This comment has been minimized.

Copy link

weakish commented Nov 6, 2014

With some ugliness:

>> =~ /#<Object:0x.+>/
=> 0

This comment has been minimized.

Copy link

tfausak commented Sep 11, 2015

@tfausak tfausak closed this Sep 11, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.