DonutWorks / Ari

0 stars 0 forks source link

all tests are passed w/ selenium #393

Closed angdev closed 9 years ago

angdev commented 9 years ago

392

selenium으로 돌려보시려면 rails_helper.rb config 제일 아래 줄에 있는 주석을 푸시면 됩니다.

  # Capybara.default_driver = :selenium
shaynekang commented 9 years ago

음. 저는 Pending이 1개, Failure가 1개가 뜨네요.

Pending:
  user auth process lets me fail to kakao log in
    # Omniauth testing limitation
    # ./spec/acceptance/user_auth_spec.rb:43
Failures:

  1) user auth process when try to log in w/kakao when try to activate an account w/ valid phone_number when user is activated when user logged in without remember me when user logged in should prevent me from accessing another club
     Failure/Error: expect(page).to have_content("존재하지 않는 동아리입니다.")
       expected to find text "존재하지 않는 동아리입니다." in "휴대폰 번호를 입력해주세요 John Doe"
     # ./spec/acceptance/user_auth_spec.rb:170:in `block (7 levels) in <top (required)>'
     # ./spec/rails_helper.rb:40:in `block (2 levels) in <top (required)>'

Finished in 2 minutes 16 seconds (files took 7.02 seconds to load)
55 examples, 1 failure, 1 pending

Failed examples:

rspec ./spec/acceptance/user_auth_spec.rb:168 # user auth process when try to log in w/kakao when try to activate an account w/ valid phone_number when user is activated when user logged in without remember me when user logged in should prevent me from accessing another club

Failure의 경우 Selenium을 사용하지 않은 경우에는 발생하지 않았습니다. ㅎㅎ

shaynekang commented 9 years ago

그리고 Selenium으로 돌리고 싶을 경우, 코드를 고치지 않고 터미널에서 옵션을 줘서 실행하도록 변경할 수 있을까요? 저는 주로 이렇게 했습니다.

drivder=selenium bundle exec rspec spec/acceptance

이러면 ENV["drivder"]에 "selenium"이라는 값이 들어오니, 이를 활용하면 되겠죠. ㅎㅎ