nacnudus / tidyxl

Read untidy Excel files in R https://nacnudus.github.io/tidyxl/
https://nacnudus.github.io/tidyxl/
Other
246 stars 20 forks source link

Fix testthat error on xlex class #57

Closed nacnudus closed 4 years ago

nacnudus commented 4 years ago

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.