Timecop post creation for cucumber

This commit is contained in:
Jonne Haß 2012-04-07 00:09:16 +02:00
parent c1694eb06e
commit dba3dbbfeb

View file

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