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

Fix testthat error on xlex class #57

Merged
merged 3 commits into from
Mar 20, 2020
Merged

Fix testthat error on xlex class #57

merged 3 commits into from
Mar 20, 2020

Conversation

nacnudus
Copy link
Owner

xlex() returns a tibble with an extra class "xlex" for print.xlex(). This
extra class is now detected by testthat::expect_equal() when comparing it to a
contrived tibble.

The tests now use a wrapper of xlex() called un_xlex() that strips the
"xlex" class so that it can be safely compared with a tibble.

Alternatively, I could have defined a wrapper class for tribble() that added
the extra class, but it would have been more trouble to format the code nicely.

`xlex()` returns a tibble with an extra class `"xlex"` for `print.xlex()`.  This
extra class is now detected by `testthat::expect_equal()` when comparing it to a
contrived tibble.

The tests now use a wrapper of `xlex()` called `un_xlex()` that strips the
`"xlex"` class so that it can be safely compared with a tibble.

Alternatively, I could have defined a wrapper class for `tribble()` that added
the extra class, but it would have been more trouble to format the code nicely.
@nacnudus nacnudus merged commit 0aba3bc into master Mar 20, 2020
@nacnudus nacnudus deleted the xlex-class branch March 20, 2020 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant