Skip to content

Instantly share code, notes, and snippets.

@aslakhellesoy
Created June 13, 2009 20:35
Show Gist options
  • Select an option

  • Save aslakhellesoy/129423 to your computer and use it in GitHub Desktop.

Select an option

Save aslakhellesoy/129423 to your computer and use it in GitHub Desktop.

Revisions

  1. aslakhellesoy revised this gist Jun 13, 2009. 2 changed files with 7 additions and 0 deletions.
    File renamed without changes.
    7 changes: 7 additions & 0 deletions whatsnext/application.rb
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    module Whatsnext
    class Application < Sinatra::Base
    post '/features/*' do
    puts request.body.read
    end
    end
    end
  2. aslakhellesoy created this gist Jun 13, 2009.
    14 changes: 14 additions & 0 deletions env.rb
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,14 @@
    # RSpec
    require 'spec/expectations'

    # Webrat
    require 'rack/test'
    require 'webrat/sinatra'
    Webrat.configure do |config|
    config.mode = :sinatra
    end

    World(Webrat::Matchers, Webrat::HaveTagMatcher, Rack::Test::Methods) do
    context = OpenStruct.new(:app => Whatsnext::Application)
    Webrat::SinatraSession.new(context)
    end
    3 changes: 3 additions & 0 deletions gistfile2.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,3 @@
    When /^I save it as an existing file$/ do
    post("/foo", 'bar')
    end