Skip to content

Instantly share code, notes, and snippets.

@wacko
Created May 14, 2015 18:33
Show Gist options
  • Save wacko/565c4e85279325110402 to your computer and use it in GitHub Desktop.
Save wacko/565c4e85279325110402 to your computer and use it in GitHub Desktop.
Cuba basic test
require 'cuba'
class MyApp < Cuba
define do
on root do
res.write "it works!"
end
end
end
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