From 28770a5143bb5b48389d5ad4ce235625c12f1056 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Tue, 8 Dec 2015 00:28:52 -0500 Subject: app.rb: Remove Sinatra::Base application wrapper Don't wrap our routes/controllers in a `Sinatra::Base` class to keep things simple. Was doing this because I thought I needed to in order to be able to tell Capybara where the application was but looking at the Sinatra testing page (http://www.sinatrarb.com/testing.html), they provide an example for Capybara that details this `Sinatra::Application.new` call that I can make instead. This frees us up to use the simplified application definition. --- app.rb | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'app.rb') diff --git a/app.rb b/app.rb index 5533c06..ec53617 100644 --- a/app.rb +++ b/app.rb @@ -1,12 +1,10 @@ -require 'sinatra/base' +require 'sinatra' -class App < Sinatra::Base - get '/' do - erb :index - end +get '/' do + erb :index +end - post '/' do - 'POST works' - end +post '/' do + 'POST works' end -- cgit v1.2.3