Skip to content

Instantly share code, notes, and snippets.

@biot023
Created February 3, 2011 20:24
Show Gist options
  • Save biot023/810123 to your computer and use it in GitHub Desktop.
Save biot023/810123 to your computer and use it in GitHub Desktop.
# Generated by cucumber-sinatra. (2011-02-01 22:03:41 +0000)
ENV['RACK_ENV'] = 'test'
require File.join(File.dirname(__FILE__), '..', '..', 'lib/my_app.rb')
require 'capybara'
require 'capybara/cucumber'
require 'rspec'
require "rack/test"
Capybara.app = MyApp
class MyAppWorld
def app; MyApp; end # <-- put in as a hack to get rid of no 'app' method or variable error
include Capybara
include RSpec::Expectations
include RSpec::Matchers
include Rack::Test::Methods
end
World do
MyAppWorld.new
end
@hedgehog
Copy link

hedgehog commented Feb 3, 2011

Should that last part be:

World do
  MyAppWorld.new
end

@biot023
Copy link
Author

biot023 commented Feb 3, 2011

Indeed it should -- just corrected it, thankyou. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment