I'm defining a CONSTANT in my env.rb file in cucumber as:
CONFIG = YAML::load_file("#{File.dirname(__FILE__)}/../../configs/config.yaml")
Then I want to access values from that 'config.yaml' file, like CONFIG['url']
.
The problem I'm having is that I've got a page object siteprism class and I don't know how to access it?
class MyPage < SitePrism::Page
set_url CONFIG['url']
...
it's failing with:
uninitialized constant MyPage::CONFIG (NameError)
I want to access the CONFIG constant that was defined in my env.rb file though, not a constant from MyPage. Do you guys know how I could achieve this?