Created
April 5, 2017 18:15
-
-
Save suhanlee/7b30b98858bbf81cec82423dfc6dfaac to your computer and use it in GitHub Desktop.
rails-capybara
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'test_helper' | |
class ControllerTest < ActionDispatch::IntegrationTest | |
include Capybara::DSL | |
test "visit point charge list" do | |
visit point_charge_list_path | |
assert page.has_content?('보유중인 포인트'), '타이틀이 존재 하지 않음' | |
assert page.has_css?('div.MyCoinView'), "보유 중인 포인트에 대한 뷰가 존재 하지 않음" | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
group :development, :test do | |
gem 'capybara' | |
gem 'selenium-webdriver', '~> 3.3.0' | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'capybara/rails' | |
require 'capybara/dsl' | |
Capybara.register_driver :selenium_chrome do |app| | |
Capybara::Selenium::Driver.new(app, :browser => :chrome) | |
end | |
# default is firefox | |
Capybara.current_driver = :selenium |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment