inchworms / sinatra_tests

RSpec tests for Sinatra
5 stars 2 forks source link

rout_internals_spec: why is the expect block within the app block? #7

Closed carlad closed 11 years ago

carlad commented 11 years ago

it "sets env['sinatra.route'] to the matched route" do app = Sinatra.new do after do expect(response[1][env]).to be == ["sinatra.route"] end get '/users/:id/status' do 'ok' end end response = app.call 'REQUEST_METHOD' => 'GET', 'PATH_INFO' => '/users/1/status', 'rack.input' => '' end