From eee53e8f6e7f3839d2f477d72410e512e4975845 Mon Sep 17 00:00:00 2001 From: Yuki Date: Mon, 11 May 2015 15:20:20 +0530 Subject: [PATCH] WHAT IS MAKING THIS ERROR WTF --- spec/features/users/inbox_spec.rb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/spec/features/users/inbox_spec.rb b/spec/features/users/inbox_spec.rb index 565d7be5..9df06407 100644 --- a/spec/features/users/inbox_spec.rb +++ b/spec/features/users/inbox_spec.rb @@ -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