[rspec-users] load global variable so I can access in spec files

Andy Lindeman alindeman at gmail.com
Thu Sep 27 03:17:26 UTC 2012

On Wed, Sep 26, 2012 at 10:25 PM, S Ahmed <sahmed1020 at gmail.com> wrote:
> How can I do this?

If it's truly something that just needs to be loaded once and then is
used without mutation in any number of tests, you might just set it to
a constant in spec_helper.rb:

CONFIG = YAML.load("...")


Andy Lindeman

More information about the rspec-users mailing list