WHAT IS MAKING THIS ERROR WTF

This commit is contained in:
Yuki 2015-05-11 15:20:20 +05:30
parent bda777fe2d
commit eee53e8f6e
1 changed files with 7 additions and 7 deletions

View File

@ -25,21 +25,21 @@ feature "Inbox", :devise do
login_as me, scope: :user
visit root_path
expect(page).to have_text('1 new question'.upcase)
page.driver.render Rails.root.join("tmp/#{Time.now.to_i}_1.png"), full: true
page.driver.render Rails.root.join("tmp/answer_#{Time.now.to_i}_1.png"), full: true
click_link "Inbox"
expect(page).to have_text(question.content)
fill_in "ib-answer", with: Faker::Lorem.sentence
page.driver.render Rails.root.join("tmp/#{Time.now.to_i}_2.png"), full: true
expect(page).to have_text(question.content, wait: 2)
fill_in "ib-answer", with: "This is an answer. I'm number i!"
page.driver.render Rails.root.join("tmp/answer_#{Time.now.to_i}_2.png"), full: true
click_button "Answer"
wait_for_ajax
expect(page).not_to have_text(question.content, wait: 2)
page.driver.render Rails.root.join("tmp/#{Time.now.to_i}_3.png"), full: true
expect(page).to have_text("Successfully answered question.", wait: 2)
page.driver.render Rails.root.join("tmp/answer_#{Time.now.to_i}_3.png"), full: true
visit show_user_profile_path(me.screen_name)
expect(page).to have_text(question.content)
page.driver.render Rails.root.join("tmp/#{Time.now.to_i}_4.png"), full: true
page.driver.render Rails.root.join("tmp/answer_#{Time.now.to_i}_4.png"), full: true
end
# Scenario: User generates new question