Diary of a Rails rescue project, part 2: Testing #rails

Diary of a Rails rescue project, part 2: Testing April 16, 2013 As mentioned previously , I’ve been spending spare cycles getting an outdated Rails application up to speed. Aside from the outdated versions of Rails and pretty much every gem used by the app, there’s a glaring problem: No usable tests. Without tests, I can’t be certain of what the application is supposed to do. What’s more, I can’t be sure that the rather massive changes I’m making to the code’s underpinnings won’t break functionality. While the previous developer did have some tests in place, I quickly lost faith in them: On first run I got a number of deprecation warnings, then 60 percent of the provided tests failed. Upon further inspection, it became evident that most of the files in the spec/ directory were stubs generated by the likes of rails generate scaffold . To address this, I decided to write out...