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

S Ahmed sahmed1020 at gmail.com
Thu Sep 27 02:25:58 UTC 2012


In my spec_helper, I want to load yaml file to a variable, and then be able
to use that in my tests.

spec_helper.rb:


RSpec.configure do |config|

end


config = YAML::Load(......)




some_spec.rb

describe 'blah' do

  it "should be...." do
    MyClass.new( config['test'] )
  end

end


How can I do this?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20120926/e456e4de/attachment.html>


More information about the rspec-users mailing list