require 'spec_helper'

describe Export do
  it '#export' do
    FactoryGirl.reload

    user = create :user, created_at: Time.at(0)
    user.updated_at = Time.at(1000)
    user.confirmation_token = 'moi'
    user.confirmation_sent_at = Time.at(2000)
    user.save!

    create :social_account, :twitter, user: user,
      created_at: Time.at(3000), updated_at: Time.at(4000)

    create :fact_data, created_at: Time.at(5000), updated_at: Time.at(6000)

    verify(format: :text) { Export.new.export }
  end
end

require 'spec_helper'

describe Export do
  it '#export' do
    FactoryGirl.reload

    user = create :user, created_at: Time.parse("1970-01-01")
    user.updated_at = Time.parse("1970-01-02")
    user.confirmation_token = 'moi'
    user.confirmation_sent_at = Time.parse("1970-01-03")
    user.save!

    create :social_account, :twitter, user: user,
      created_at: Time.parse("1970-01-04"), updated_at: Time.parse("1970-01-05")

    create :fact_data, created_at: Time.parse("1970-01-06"), updated_at: Time.parse("1970-01-07")

    verify(format: :text) { Export.new.export }
  end
end

Use more explicit timestamps to make it easier to verify fixture
Use more explicit timestamps to make it easier to verify fixture
