everypolitician / compare_with_wikidata

Library for diffing Wikidata and CSVs
MIT License
2 stars 0 forks source link

Move daff logic into separate class and add tests #25

Closed chrismytton closed 7 years ago

chrismytton commented 7 years ago

This moves the code for interacting with daff into a Comparison class. I've also added some (very basic) tests for this new class.

Notes to reviewer

This refactoring was prompted by wanting to add a regression test when fixing #65. Because the code I wanted to add a regression test for was deep in CompareWithWikidata::DiffOutputGenerator#run! adding a test would have meant writing a full end to end integration test. So this pull request is in the spirit of "make the change easy and then make the easy change".

Should unblock #65

mhl commented 7 years ago

Looks good :+1: This is definitely clearer to me.