title: node.js set process.env variable in test
body: <p>when I run a test in node.js with mocha, how I can set temporal environment variables?</p>
  
  <p>in a module, I have a variable depending of a environment variable</p>
  
  <pre><code>var myVariable = proccess.env.ENV_VAR;
  </code></pre>
  
  <p>now I use the <a href="https://github.com/jhnns/rewire" rel="nofollow">rewire</a> module,</p>
  
  <pre><code>var rewire = require('rewire');
  var myModule = rewire('../myModule');
  
  myModule.__set__('myVariable', 'someValue');
  </code></pre>
  
  <p>exist a more simple way? without the rewire module? </p>