title: RSpec Rails Serializer JSON
body: <p>I am trying write a simple Rspec for a serializer that I have in my rails application. I tried using: </p>
  
  <p><a href="https://github.com/ahawkins/active_model_serializers-matchers" rel="nofollow">ActiveModelSerializer::Matchers</a>. Since this did not work. I did try to make my Rspec test for this look like the following: </p>
  
  <pre><code>require 'spec_helper'
  
  describe CoffeeTypeSerializer do
  
    it { should have_key(:name) }
    it { should have_key(:image) }
    it { should have_key(:type_of_coffee) }
    it { should have_key(:temp) }
    it { should have_key(:caffeinated) }
    it { should have_key(:basicInfo) }
    it { should have_key(:price) }
    it { should have_key(:created_at) }
    it { should have_key(:updated_at) }
    it { should have_key(:fullInfo) }
    it { should have_key(:drinks) }
  end
  </code></pre>
  
  <p>Unfortunately had no luck with this and got the following error: </p>
  
  <blockquote>
    <p>ArgumentError: wrong number of arguments (0 for 1..2)</p>
  </blockquote>
  
  <p>Tried searching high and low, but what is the best way to test JSON serializers</p>