Giving Roo's tests some love and attention #365
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Contains the following changes:
test_csv.rb
,test_excelx.rb
)Refactored tests into different formats
This is the initial cleanup work for Roo's tests. Over the past year, I've
spent a lot of time thinking about #242, and I've written a lot of code
around implementing such an API. Unfortunately, I'd always end up
at a point where I wasn't happy with the either the test coverage of
the new API or the how the functionality between the two APIs was
mixed. As I said, I have a lot of partially written code.
The ultimate goal of the test refactoring is to allow me to create the
new API while also being able to take advantage of Roo's test suite.
Added Rack app for testing download capabilities
Added a rack app for downloading spreadsheet files. This allows Roo
to test downloading files without webmock or VCR.
###Fixed TestRoo#test_finalize
test_finalize
broke in ruby 2.4 because of changes in Ruby's GC. InRuby 2.4, the last object being created didn't get GC'd, which was a
change from earlier behavior. The initial fix was to fork the process to
make sure directories where being cleaned properly.
Unfortunately, this caused a segfault when running the entire test suite.
The segfault issue was related to where
ObjectSpace.define_finalizer
was being called from (a class that was being extended by a module).
This is probably related to Nokogiri, but I wasn't able to develop a trivial
example of the error.
Moving the finalizer's cration to
Roo::Excelx/Roo::OpenOffice
classesfixed the issue in Ruby 2.4.0.
[Same as #361 which disappeared somehow]