artsy/garner — pull request #9 by macreery (2012-09-21 15:06:40+00:00)
Title: @dblock: Fix for calling helpers like find_cached_by_slug in an IRB session

Fixes #3. This was preventing me from debugging a cache issue this morning, so fixed.

Wanted to write a spec, but not sure if it's possible. Stubbing `Kernel.caller` has unintended effects. For example, the following RSpec example doesn't work:

```ruby
it "does not choke on IRB sessions" do
Kernel.stub(:caller) { ["(irb):0:in `get_awesome`"] }
subject.apply({})[:caller].should_not raise_error
end
```