How to define a simple global variable in an rspec test that can be accesed by helper functions

后端 未结 3 1234
星月不相逢
星月不相逢 2021-01-11 18:05

I cant figure out how to use a simple global variable in an rspec test. It seems like such a trivial feature but after much goggleing I havent been able to find a solution.

3条回答
  •  北海茫月
    2021-01-11 18:51

    It turns out the easiest way is to use a $ sign to indicate a global variable.

    See Preserve variable in cucumber?

提交回复
热议问题