Why do we make testing so complicated? Timecop, VCR, webmock, shoulda-matchers, factory_girl, rspec-integrates-with-your-smart-refrigerator
-
-
Replying to @nateberkopec
Testing pain due to missing abstractions in code you don't own can only be addressed with testing tools. Gems you listed are great examples.
1 reply 0 retweets 8 likes -
Replying to @backus @nateberkopec
Timecop: Time, Date, DateTime are all basically a global variables. Timecop works around not being able to inject these as dependencies.
1 reply 0 retweets 5 likes -
Replying to @backus @nateberkopec
VCR, Webmock: Ecosystem missing good request CQRS abstraction. Workaround is stub the world and record massive HTTP request+response files
1 reply 0 retweets 4 likes -
Replying to @backus @nateberkopec
Shoulda matchers: How the heck do we test these massive rails god objects that are hard to setup? Corresponding god object gem!
1 reply 0 retweets 1 like -
Replying to @backus @nateberkopec
Also especially with controllers there is just a lot of testing that requires coupling to the implementation. Better a gem do it that me
1 reply 0 retweets 2 likes -
Replying to @backus @nateberkopec
FactoryGirl: DB FKs+validation+callbacks coupled to domain model! Tons of setup & unclear how to decouple. Workaround: DSL + deep AR stubs!
1 reply 0 retweets 1 like
BTW I don't think these libs are bad. They are trying to solve pain they didn't introduce. Can be a problem though if you don't realize that
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.