title: How to declare a variable shared between examples in RSpec?
body: <p>Suppose I have the following spec:</p>
  <pre><code>describe Thing do
    it 'can read data' do
      @data = get_data_from_file  # [ '42', '36' ]
      expect(@data.count).to eq 2
    end
  
    it 'can process data' do
      expect(@data[0].to_i).to eq 42  # Fails because @data is nil
    end
  end
  </code></pre>
  <p>All I wanted is to have a variable shared in the given <em>describe</em> or <em>context</em>. I would write a value in one example and read it in another. How do I do that?</p>