[rspec-users] Content assist for spec files

Bryan Liles bryan at osesm.com
Wed Sep 5 20:10:29 EDT 2007

On Sep 5, 2007, at 7:05 PM, Tor Norbye wrote:
> The problem is that when I'm looking at a spec file, there are no
> require-statements. Obviously, the methods I see called in the spec
> files must be defined by the test runner itself before running the
> spec file.
> Can somebody enlighten me as to what that context looks like?
> (As an example, in Ruby on Rails "view" files, I treat the file as if
> it's extending ActionView::Base, so all the methods on that class
> (and included modules and such) all become available as methods you
> can call from the view. I was wondering if there was a similar class,
> or set of Modules, that I can use to simulate the context for the
> code inside the _spec.rb file.)

Hello Tor.  At the top of my spec files is:

require File.dirname(__FILE__) + '/../spec_helper'

(At least in my Rails specs)


More information about the rspec-users mailing list