diff --git a/Gemfile b/Gemfile index 9fc5f8e0c..ace60c8fd 100644 --- a/Gemfile +++ b/Gemfile @@ -197,7 +197,7 @@ group :test do # General helpers gem 'factory_girl_rails', '4.2.1' - gem 'timecop', '0.6.1' + gem 'timecop', '0.7.0' gem 'webmock', '1.13.0', :require => false end diff --git a/Gemfile.lock b/Gemfile.lock index 7e269fbed..194effc38 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -393,7 +393,7 @@ GEM test_after_commit (0.2.0) thor (0.18.1) tilt (1.4.1) - timecop (0.6.1) + timecop (0.7.0) timers (1.1.0) treetop (1.4.15) polyglot @@ -500,7 +500,7 @@ DEPENDENCIES spork (= 1.0.0rc3) strong_parameters test_after_commit (= 0.2.0) - timecop (= 0.6.1) + timecop (= 0.7.0) twitter (= 4.8.1) typhoeus (= 0.6.3) uglifier (= 2.1.2) diff --git a/spec/controllers/jasmine_fixtures/streams_spec.rb b/spec/controllers/jasmine_fixtures/streams_spec.rb index df5280d2d..2a3a8a1b8 100644 --- a/spec/controllers/jasmine_fixtures/streams_spec.rb +++ b/spec/controllers/jasmine_fixtures/streams_spec.rb @@ -16,12 +16,12 @@ describe StreamsController do time = Time.now 10.times do |i| - Timecop.travel time += 1.day do - Timecop.travel time += 1.minute + Timecop.travel(time += 1.day) do + Timecop.travel(time += 1.minute) posts << alice.post(:status_message, :text => "hella infos yo!", :to => alice.aspects.first.id) - Timecop.travel time += 1.minute + Timecop.travel(time += 1.minute) posts << alice.post(:reshare, :root_guid => FactoryGirl.create(:status_message, :public => true).guid, :to => 'all') - Timecop.travel time += 1.minute + Timecop.travel(time += 1.minute) if i == 9 posts << alice.post(:status_message, :text => "LONG POST TO TEST SHOW MORE. Cardigan trust fund vice, sartorial twee pitchfork +1 quinoa whatever readymade gluten-free. Seitan brooklyn mustache quinoa carles. Gentrify ethical four loko you probably haven't heard of them 3 wolf moon helvetica. Terry richardson +1 artisan, raw denim iphone four loko leggings organic helvetica retro mcsweeney's put a bird on it skateboard 3 wolf moon. Fap skateboard high life 8-bit. Iphone ethical tumblr lo-fi, dreamcatcher irony whatever farm-to-table mustache tofu marfa. Before they sold out next level lomo farm-to-table leggings, williamsburg jean shorts messenger bag. Synth readymade Austin artisan art party, cardigan vice mustache 3 wolf moon craft beer. Messenger bag before they sold out tattooed wayfarers viral photo booth. Food truck master cleanse locavore raw denim. Sustainable master cleanse seitan, trust fund cred yr keffiyeh butcher mlkshk put a bird on it gentrify you probably haven't heard of them vinyl craft beer gluten-free. Master cleanse retro next level messenger bag craft beer. DIY leggings dreamcatcher lo-fi. Etsy carles tattooed mcsweeney's food truck DIY wolf shoreditch.", @@ -46,16 +46,16 @@ TXT else posts << alice.post(:status_message, :text => "you're gonna love this.", :to => alice.aspects.first.id) end - Timecop.travel time += 1.minute + Timecop.travel(time += 1.minute) alice.like!(posts.last) end end - get :multi, :format => :json - response.should be_success - save_fixture(response.body, "stream_json") - - Timecop.return + Timecop.travel(time) do + get :multi, :format => :json + response.should be_success + save_fixture(response.body, "stream_json") + end end end end