Skip to content

Conversation

@runkmc
Copy link

@runkmc runkmc commented Sep 17, 2013

No description provided.

@elubin
Copy link

elubin commented Sep 19, 2013

please include the output file in the checkin

@elubin
Copy link

elubin commented Sep 19, 2013

having so many private methods, IMO, means you should have a lot more tests. your only public method hits every one of the private ones, and since you can't test them individually, i think you need to try and figure out ways to test them.

@mrhead
Copy link

mrhead commented Sep 20, 2013

You should not test your private methods! http://www.youtube.com/watch?v=URSWYvyc42M https://gist.github.com/jamesgary/5491390

@elubin
Copy link

elubin commented Sep 20, 2013

yeah, yeah,.. .i know you don't test private methods. i meant you do so little in initialize and download_file, that you need to pass in more edge cases to those methods so you exercise all of the private methods for error conditions.

bin/analyze.rb Outdated
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might have been nice for the ShakespeareAnalyzer initializer to just accept a string, to avoid it being coupled to theDownloader class.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I initially wanted ShakespeareAnalyzer to be concerned only with the xml. I think a good compromise in the meantime would be to make these names a little clearer. "Downloader" is too loaded a term for what happens.

@andyw8
Copy link

andyw8 commented Sep 22, 2013

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like xml_provider as a name!

@r00k
Copy link
Contributor

r00k commented Sep 26, 2013

Excellent work!

Great job isolating responsibilities at the class level (with Downloader), and at the method level (things like in_descending_order).

@r00k r00k mentioned this pull request Sep 26, 2013
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.

6 participants