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) bryanl http://smartic.us _______________________________________________ rspec-users mailing list [email protected] http://rubyforge.org/mailman/listinfo/rspec-users
