Tag Archives: Sinatra

RSpec test code extracted from Sinatra Ruby

From: http://www.sinatrarb.com/testing.html#frameworks In app/hello_world.rb require ‘sinatra’ get ‘/’ do “Hello World #{params[:name]}”.strip end In app/spec/app_spec.rb require ‘hello_world’require ‘spec’ require ‘rack/test’ set :environment, :test describe ‘The HelloWorldApp’ do include Rack::Test::Methods def app Sinatra::Application end it “says hello” do get ‘/’ last_response.should … Continue reading

Posted in Blog | Tagged , , | Comments Off on RSpec test code extracted from Sinatra Ruby