Skip to content

Instantly share code, notes, and snippets.

@yortz
Forked from jnicklas/spec.rb
Created February 14, 2010 16:59
Show Gist options
  • Save yortz/304129 to your computer and use it in GitHub Desktop.
Save yortz/304129 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