title: rspec expect date to equal
body: <p>I have an object called a work order that has the following schema:</p>
  
  <pre><code># == Schema Information
  #
  # Table name: work_orders
  #
  #  id                 :integer          not null, primary key
  #  due_on             :date
  #  name               :string(255)
  </code></pre>
  
  <p>I also have a Json output of the object when it is displayed:</p>
  
  <pre><code>{
     id: 1,
     due_on: "2015-06-08",
     name: "my work order"
  }
  </code></pre>
  
  <p>I am attempting to use rspec to confirm that date displayed by the json, matches the date of the object. This is something I have done 50 times for other objects...</p>
  
  <p>I have the following:</p>
  
  <pre><code>exemplar = FactoryGirl.create(:work_order)
  ...
  puts "Test: #{exemplar.due_on}"
  expect(exemplar.name).to      eq(hash['name'])   #This works fine!
  expect(exemplar.due_on).to    eq(hash['due_on']) #This blows up...
  </code></pre>
  
  <p>The output I get is:</p>
  
  <pre><code>Test: 2015-06-08
  
  expected: "2015-06-08"
       got: Mon, 08 Jun 2015
  </code></pre>
  
  <p>What I do not understand is where the "Mon, 08 Jun 2015" is coming from. when I print out the date with the puts statement, it shows it as 2015-06-08...</p>