0
私はレールとrspecを学習しており、簡単なカートシステムを備えたアプリケーションを作成しました。それをテストするために、私は、しかし、私はかなり理解していないエラーに遭遇しましたが、要求仕様を書いた私のスペックは以下のとおりです。商品をショッピングカートに追加する
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
と指定されたエラーは次のとおりです。
Failure/Error: When {xhr get "/line_items?product_id=#{product.id}"}
ArgumentError:
wrong number of arguments (given 1, expected 2+)
私はこれにはとても新しいので、何をすべきかわかりません。