Timecop post creation for cucumber
This commit is contained in:
parent
c1694eb06e
commit
dba3dbbfeb
1 changed files with 7 additions and 3 deletions
|
|
@ -1,8 +1,12 @@
|
||||||
module PublishingCukeHelpers
|
module PublishingCukeHelpers
|
||||||
def make_post(text)
|
def make_post(text)
|
||||||
fill_in 'status_message_fake_text', :with => text
|
@@last_post_time ||= Time.now
|
||||||
click_button :submit
|
Timecop.travel @@last_post_time += 1.minute do
|
||||||
wait_for_ajax_to_finish
|
fill_in 'status_message_fake_text', :with => text
|
||||||
|
click_button :submit
|
||||||
|
wait_for_ajax_to_finish
|
||||||
|
end
|
||||||
|
Timecop.return
|
||||||
end
|
end
|
||||||
|
|
||||||
def click_and_post(text)
|
def click_and_post(text)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue