bump Timecop
Time.now remains the same inside the block, outside of the block it returns
This commit is contained in:
parent
42f790fa13
commit
08acd6e5bf
3 changed files with 13 additions and 13 deletions
2
Gemfile
2
Gemfile
|
|
@ -197,7 +197,7 @@ group :test do
|
||||||
# General helpers
|
# General helpers
|
||||||
|
|
||||||
gem 'factory_girl_rails', '4.2.1'
|
gem 'factory_girl_rails', '4.2.1'
|
||||||
gem 'timecop', '0.6.1'
|
gem 'timecop', '0.7.0'
|
||||||
gem 'webmock', '1.13.0', :require => false
|
gem 'webmock', '1.13.0', :require => false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -393,7 +393,7 @@ GEM
|
||||||
test_after_commit (0.2.0)
|
test_after_commit (0.2.0)
|
||||||
thor (0.18.1)
|
thor (0.18.1)
|
||||||
tilt (1.4.1)
|
tilt (1.4.1)
|
||||||
timecop (0.6.1)
|
timecop (0.7.0)
|
||||||
timers (1.1.0)
|
timers (1.1.0)
|
||||||
treetop (1.4.15)
|
treetop (1.4.15)
|
||||||
polyglot
|
polyglot
|
||||||
|
|
@ -500,7 +500,7 @@ DEPENDENCIES
|
||||||
spork (= 1.0.0rc3)
|
spork (= 1.0.0rc3)
|
||||||
strong_parameters
|
strong_parameters
|
||||||
test_after_commit (= 0.2.0)
|
test_after_commit (= 0.2.0)
|
||||||
timecop (= 0.6.1)
|
timecop (= 0.7.0)
|
||||||
twitter (= 4.8.1)
|
twitter (= 4.8.1)
|
||||||
typhoeus (= 0.6.3)
|
typhoeus (= 0.6.3)
|
||||||
uglifier (= 2.1.2)
|
uglifier (= 2.1.2)
|
||||||
|
|
|
||||||
|
|
@ -16,12 +16,12 @@ describe StreamsController do
|
||||||
time = Time.now
|
time = Time.now
|
||||||
|
|
||||||
10.times do |i|
|
10.times do |i|
|
||||||
Timecop.travel time += 1.day do
|
Timecop.travel(time += 1.day) do
|
||||||
Timecop.travel time += 1.minute
|
Timecop.travel(time += 1.minute)
|
||||||
posts << alice.post(:status_message, :text => "hella infos yo!", :to => alice.aspects.first.id)
|
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')
|
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
|
if i == 9
|
||||||
posts << alice.post(:status_message,
|
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.",
|
: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
|
else
|
||||||
posts << alice.post(:status_message, :text => "you're gonna love this.", :to => alice.aspects.first.id)
|
posts << alice.post(:status_message, :text => "you're gonna love this.", :to => alice.aspects.first.id)
|
||||||
end
|
end
|
||||||
Timecop.travel time += 1.minute
|
Timecop.travel(time += 1.minute)
|
||||||
alice.like!(posts.last)
|
alice.like!(posts.last)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
get :multi, :format => :json
|
Timecop.travel(time) do
|
||||||
response.should be_success
|
get :multi, :format => :json
|
||||||
save_fixture(response.body, "stream_json")
|
response.should be_success
|
||||||
|
save_fixture(response.body, "stream_json")
|
||||||
Timecop.return
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue