[Rspec-users] how to spec elements of config file usage
Pauli's List Subscriptions
margrymouse-newsletters at yahoo.com
Thu Oct 12 17:26:51 EDT 2006
I'm pretty newbie in Ruby and certainly in rspec.
I'm writing a wrapper to a 3rd party API in Ruby, and
will use a config file to persist the API user keys.
In setting up my specs I want to say things like:
"should raise exception if config file not found"
"should raise exception if config file does not
I figure that I'll swap config files in the beginning
of each spec.
If I 'require rake' in my spec script, I'll be able to
use the File methods from rake to swap out versions of
my config file - right? Any reason not to do it that
way, i.e. some other Ruby library is better?
Other recommended methods to handle specs around
presence / contents of file system objects?
More information about the Rspec-users