Skip to content

Instantly share code, notes, and snippets.

@dchelimsky
Created May 3, 2011 00:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dchelimsky/952630 to your computer and use it in GitHub Desktop.
Save dchelimsky/952630 to your computer and use it in GitHub Desktop.
rvm @capybara-example --create
gem install bundler
gem install rails -v 3.0.7
rails new example
cd example
echo 'gem "rspec-rails", "2.6.0.rc4", :group => [:development, :test]' >> Gemfile
echo 'gem "capybara", "1.0.0.beta1", :group => [:development, :test]' >> Gemfile
bundle install
rails g rspec:install
rails g scaffold things
rake db:migrate
rake db:test:prepare
echo 'require "spec_helper"
describe "things" do
describe "index" do
it "works with visit" do
visit things_path
page.status_code.should eq(200)
end
end
end
' > spec/requests/things_spec.rb
rspec spec/requests/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment