Joe Moore's blog
Desert 0.5.2 focuses on speed improvements and bug bixes.
Pivotal Tracker Stories:
- "Fix mailer templates -- very slow with Desert": ActionMailer::Base.view_paths are now cached. This speeds up ActionMailer tests/specs.
- "Plugin schema migrations should successfully convert from the 'old' scheme to the 'new' scheme": Pulled cauta/desert at master and fixed specs.
- "Add sweepers to Desert's load path": Pulled willcodeforfoo/desert at master and fixed specs.
- "Specs should handle Rails version incompatibilities"
At Pivotal, some of our client projects use plugins from our home-grown social networking platform and rely on Desert to tie them all together. To test this package of plugins we created a project that contains all of our Desert plugins and wrote some rake tasks that run all of their tests. Great, right?
Mostly. We want to ensure that our plugins have the absolute minimum dependencies to function. Let's pretend we have an UserAuth plugin and a SocialPivots plugin, where UserAuth has no dependencies, but SocialPivots depends on UserAuth. We would like to test these the to plugins in isolation. But, with Desert doing it's job so well, our UserAuth plugin could have a dependency on the SocialPivots plugins' models or tables and we would never know it. Everything from SocialPivots is mixed-in and loaded into memory, and all of its migrations have executed, at the time we are running UserAuth's tests.
What we need is a way to tell Desert to load only the plugin under test, plus its dependencies listed in init.rb. Hacking Desert and Rails to allow us to specify which plugins to load turned out to be pretty easy. Check it out (full gist here):







