Created
December 1, 2017 20:50
-
-
Save twalpole/a6bf26a7fc2814730b80654c51ff09a5 to your computer and use it in GitHub Desktop.
Charset test
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/dsl" | |
require 'selenium-webdriver' | |
require 'capybara/poltergeist' | |
html = DATA.read | |
app = proc { |env| [200, { "Content-Type" => "text/html" }, [html] ] } | |
sess1 = Capybara::Session.new(:rack_test, app) | |
sess1.visit("/") | |
sess1.find('span', text: 'Não verificado') | |
sess2 = Capybara::Session.new(:selenium_chrome, app) | |
sess2.visit("/") | |
sess2.find('span', text: 'Não verificado') | |
sess3 = Capybara::Session.new(:poltergeist, app) | |
sess3.visit("/") | |
sess3.find('span', text: 'Não verificado') | |
__END__ | |
<!doctype html> | |
<html> | |
<head> | |
<meta charset="UTF-8" content="text/html" http-equiv="content-type"> | |
<title>Some title</title> | |
</head> | |
<body> | |
<span class="text-bold text-negative"> (Não verificado)</span | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment