Skip to content

Instantly share code, notes, and snippets.

@jnicklas
Created January 12, 2010 22:00
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jnicklas/275669 to your computer and use it in GitHub Desktop.
Save jnicklas/275669 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'spec'
require 'spec/autorun'
require 'capybara'
require 'capybara/dsl'
Capybara.app = proc { |env| [200, {}, "Hello World"]}
Spec::Runner.configure do |config|
config.include Capybara
end
describe "MyApp" do
before do
visit('/')
end
it "should show Hello World" do
page.should have_content('Hello World')
end
it "should not show Hello Doug" do
page.should_not have_content('Hello Doug')
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment