-
-
Save brynary/129426 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module Whatsnext | |
| class Application < Sinatra::Base | |
| post '/features/*' do | |
| puts request.body.read | |
| end | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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