Edward Ocampo-Gooding
2007-Jun-13 01:23 UTC
[rspec-users] standard location for spec helpers
Is there a standard location for spec helpers (as in bits of code that help write specs)? I''m mocking/stubing-out portions of ActiveSalesforce, a remote-database abstraction layer so my specs won''t have to rely on a remote connection, but I''m not sure where I should be putting this helper lib. I was thinking of just sticking it in spec/ but I was curious if there''s a standard place for it. Thanks!
On 6/12/07, Edward Ocampo-Gooding <edward.og at gmail.com> wrote:> Is there a standard location for spec helpers (as in bits of code that help > write specs)? > > I''m mocking/stubing-out portions of ActiveSalesforce, a remote-database > abstraction layer so my specs won''t have to rely on a remote connection, but I''m > not sure where I should be putting this helper lib. I was thinking of just > sticking it in spec/ but I was curious if there''s a standard place for it. > > Thanks! > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >I created a spec/lib dir and throw my spec helper files in there. Then I require them in spec_helper.rb Pat
On 6/12/07, Pat Maddox <pergesu at gmail.com> wrote:> On 6/12/07, Edward Ocampo-Gooding <edward.og at gmail.com> wrote: > > Is there a standard location for spec helpers (as in bits of code that help > > write specs)? > > > > I''m mocking/stubing-out portions of ActiveSalesforce, a remote-database > > abstraction layer so my specs won''t have to rely on a remote connection, but I''m > > not sure where I should be putting this helper lib. I was thinking of just > > sticking it in spec/ but I was curious if there''s a standard place for it. > > > > Thanks! > > _______________________________________________ > > rspec-users mailing list > > rspec-users at rubyforge.org > > http://rubyforge.org/mailman/listinfo/rspec-users > > > > I created a spec/lib dir and throw my spec helper files in there. > Then I require them in spec_helper.rbFYI - From some other threads on this list, there seems to be an emerging convention that spec/lib is where specs for stuff in the lib directory go and shared stuff (helpers, shared behaviours, etc) go in spec/shared.> > Pat > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >
Edward Ocampo-Gooding
2007-Jun-13 01:33 UTC
[rspec-users] standard location for spec helpers
> FYI - From some other threads on this list, there seems to be an > emerging convention that spec/lib is where specs for stuff in the lib > directory go and shared stuff (helpers, shared behaviours, etc) go in > spec/shared.Right on. Thanks guys!