Environment variables are variables passed to programs by the command line or the graphical shell. Though there are a number of environment variables that only affect the command line or graphical shell itself (such as PATH or HOME), there are also several that directly affect how Ruby scripts execute.
For example, in your spec, add a code:
something = ENV['SOMETHING']
Then in the command line, use:
SOMETHING=1000
Variable something
will now be assigned to 1000.