Testing adding an item to my cart
<p>I'm learning rails and rspec and I've written a application that has a simple cart system. In order to test it I've written a request spec, however I've run into an error I don't quite understand, my spec is:</p>

<pre><code>  context 'add item to cart' do
    Given!(:product){FactoryGirl.create(:product)}
    Given {get "/"}
    When {xhr get "/line_items?product_id=#{product.id}"}
    Then { response.body.include? 'class="item_price"' }
  end
</code></pre>

<p>and the error given is:</p>

<pre><code> Failure/Error: When {xhr get "/line_items?product_id=#{product.id}"}

     ArgumentError:
       wrong number of arguments (given 1, expected 2+)
</code></pre>

<p>I'm very new to this so I'm not sure what I should be doing.</p>