Posts Resume My Philosophy Who Am I

a facet of Facets

h1. a facet of Facets p(meta). 29 Jul 2009 - Bethesda, MD I just updated to Rails 2.3.3 and my controllers screamed:
undefined local variable or method `set_test_assigns' for #
/home/matt/.gem/ruby/1.8/gems/facets-2.5.2/lib/core/facets/kernel/tap.rb:9:in `instance_eval'
/home/matt/.gem/ruby/1.8/gems/facets-2.5.2/lib/core/facets/kernel/tap.rb:9:in `tap'
/home/matt/develop/clients/nih/mpr.ror/trunk/spec/controllers/about_controller_spec.rb:11:
Turns out Facets #tap is stomping on another #tap. h2. Enter facet library loading. Instead of loading the entire Facets library, load what you need. I knew this. You knew this. It was just convenient to ignore it. I'm using Facets for ergo. That's it. No need for the kitchen sink. Replace:
config.gem 'facets', :version => '=2.5.2'
With:
config.gem 'facets', :version => '=2.5.2', :lib => 'facets/kernel/ergo'
Done. Error averted. Tiny library loaded. h2. Now... what about specs? I prefer to write a failing spec that identifies a "bug" and then write code to make it pass. This issue broke many existing specs, so I feel that I am covered. Still... it would be nice to have something which identifies this particular issue AND the fix for it. h2. Update (07/29/2009): funky formatting. %(update)Update (07/30/2009): using div as workaround.% I see the code format isn't quite right. It works locally (using `jekyll --pygments --auto --server`). Here's a screenshot: !(screenshot)/images/Facets_formatted.png(Formatted code screenshot)! Argh. Maybe these guys can help: "github support ticket":http://support.github.com/discussions/site/701-formatting-issues-for-github-pages-pygment-related