I cannot figure out how to use a simple global variable in the rspec test. It seems like such a trivial feature, but after many problems I could not find a solution.
I want a variable that can be accessed / modified in the entire main specification file and from the functions in the auxiliary specification files.
Here is what I still have:
require_relative 'spec_helper.rb' require_relative 'helpers.rb' let(:concept0) { '' } describe 'ICE Testing' do describe 'step1' do it "Populates suggestions correctly" do concept0 = "tg" selectConcept()
.
#helpers.rb def selectConcept concept0 = "First Concept" end
Can someone point out what I am missing, or if using "let" is this a completely wrong method?
source share