[rspec-users] Test configuration information

Jim Coble jim.coble at duke.edu
Wed Jan 23 18:54:21 UTC 2013


One of my tests needs to be provided with a particular directory path.  While I can code this path as a literal directly in the test spec, it seems to me it might be better to have it in a configuration file somewhere so that I have one place to maintain it and look for it.  Would spec_helper.rb be a reasonable place to define it?  Is there a more customary place?  Note that I am not trying to configure RSpec per se or even how RSpec runs the test.  Rather, I'm trying to provide some information (a character string) that the test needs in order to run.
Thanks.
--Jim

Jim Coble
Information Technology Services
Perkins Library, Duke University
Box 90196, Durham, NC 27708
919-660-5974 (voice); 919-668-2578 (fax)
Jim.coble at duke.edu<mailto:Jim.coble at duke.edu>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20130123/f51abf15/attachment.html>


More information about the rspec-users mailing list