ensure that time is always far beyond last post creation

oh yeah Timecop is really the best solution... hmpf
This commit is contained in:
Jonne Haß 2012-04-10 12:32:17 +02:00
parent 5d9bdd80ab
commit 749b403d13

View file

@ -1,10 +1,10 @@
module PublishingCukeHelpers module PublishingCukeHelpers
def make_post(text) def make_post(text)
@@last_post_time ||= Time.now
Timecop.travel @@last_post_time += 1.minute
fill_in 'status_message_fake_text', :with => text fill_in 'status_message_fake_text', :with => text
click_button :submit click_button :submit
wait_for_ajax_to_finish wait_for_ajax_to_finish
@@last_post_time ||= Time.now
Timecop.travel @@last_post_time += 1.minute
end end
def click_and_post(text) def click_and_post(text)