Created
October 27, 2016 02:04
-
-
Save twalpole/9a79ca9d4fa0b090f0bcc8ca10f47bdc to your computer and use it in GitHub Desktop.
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/poltergeist" | |
html = DATA.read | |
app = proc { |env| [200, { "Content-Type" => "text/html" }, [html] ] } | |
sess = Capybara::Session.new(:poltergeist, app) | |
sess.visit("/") | |
# behavior to be tested here | |
__END__ | |
<!doctype html> | |
<html> | |
<head> | |
<title>Some title</title> | |
</head> | |
<body> | |
<!-- HTML needed for the test --> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment