Skip to content

Instantly share code, notes, and snippets.

@brynary
Forked from aslakhellesoy/env.rb
Created June 13, 2009 20:48
Show Gist options
  • Save brynary/129426 to your computer and use it in GitHub Desktop.
Save brynary/129426 to your computer and use it in GitHub Desktop.
module Whatsnext
class Application < Sinatra::Base
post '/features/*' do
puts request.body.read
end
end
end
require 'spec/expectations'
require 'rack/test'
require 'webrat'
Webrat.configure do |config|
config.mode = :rack
end
class MyAppTest
include Rack::Test::Methods
include Webrat::Methods
include Webrat::Matchers
include Webrat::HaveTagMatcher
def app
Sinatra::Application
end
end
When /^I save it as an existing file$/ do
post("/foo", 'bar')
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment