rspec/rspec-core — pull request #1253 by samphippen (2014-01-19 12:30:45+00:00)
Title: Include the spec location in warnings if we can't generate a call site.

Whilst investigating https://github.com/rspec/rspec-mocks/pull/496 I came across the problem where it wasn't clear where the warning was being issued from, and that the caller filter would fail because we're outside of user code at that point.

This patch makes it so that RSpec core's warn_with will include the location of the spec that's running if the call site is explicitly nil. This means that we can add warnings outside a user's testing block and still hopefully point them in the correct direction.