[openstreetmap/openstreetmap-website] Replace trace-related fixtures with factories. (#1347)

Andy Allan notifications at github.com
Mon Dec 19 08:00:20 UTC 2016


> So I'm interested in why you think it's a worse solution?

Mainly just the slowdown from having to write files to disk (when they already exist elsewhere on the disk anyway), which is a big slowdown compared to stubbing things, especially when the models only need to *read* from disk anyway. Then if we're writing stuff to disk during a test, we need to make sure we clean everything up again. With the stubbing, when the tests finish (or are interrupted) there's nothing permanent.

So that's why I prefer stubbing to shifting things around on disk. But if you'd prefer to do the disk approach I can do that.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/1347#issuecomment-267903510
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20161219/7e7f6a7e/attachment.html>


More information about the rails-dev mailing list