ruby and rspec - Failing test
<p>I am supposed to make this test pass.</p>

<pre><code>describe 'new' do
    it "takes a parameter and returns a HangpersonGame object" do      
      @hangpersonGame = HangpersonGame.new('glorp')
      expect(@hangpersonGame).to be_an_instance_of(HangpersonGame)
      expect(@hangpersonGame.word).to eq('glorp')
      expect(@hangpersonGame.guesses).to eq('')
      expect(@hangpersonGame.wrong_guesses).to eq('')
    end
  end
</code></pre>

<p>My code is this,</p>

<pre><code>class HangpersonGame


    attr_accessor :word
    attr_accessor :guesses
    attr_accessor :wrong_guesses

  def initialize(word)
    @word = word
    @guesses = nil
    @wrong_guesses = nil

  end
end
</code></pre>

<p>The test is failing. Why? I have run the code seperately and it seems to work.</p>