[rspec-users] load global variable so I can access in spec files
alindeman at gmail.com
Fri Sep 28 02:39:07 UTC 2012
Not if it's a constant. You'll need to make sure it starts with a capital
letter for it to be interpreted as such by Ruby; otherwise it's just a
On Thursday, September 27, 2012, S Ahmed wrote:
> I do have it in my spec_helper, does it have to be inside the RSpec.config
> > 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
>> rspec-users mailing list
>> 'rspec-users at rubyforge.org');>
Sent from a mobile device. Please excuse the brevity and top reply.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the rspec-users