Created
May 14, 2015 18:33
-
-
Save wacko/565c4e85279325110402 to your computer and use it in GitHub Desktop.
Cuba basic test
This file contains 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 'cuba' | |
class MyApp < Cuba | |
define do | |
on root do | |
res.write "it works!" | |
end | |
end | |
end |
This file contains 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 "cuba/capybara" | |
require "./app" | |
Capybara.app = MyApp | |
scope do | |
test "root" do | |
visit "/" | |
assert has_content?("it works!") | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment