Sha256: 54f2d5ca31bf1f0a8b62cba6b2573337fa28c6b23a91b924ef1133092b227a1e
Contents?: true
Size: 466 Bytes
Versions: 1
Compression:
Stored size: 466 Bytes
Contents
require 'spec_helper' describe Librato::Grape::Middleware do class TestAPI < Grape::API use Librato::Grape::Middleware get 'hello/:name' do "hello #{params['name']}" end end def app; TestAPI; end it "should send a timing event for each request" do Librato.should_receive(:timing).with('GET.hello.:name').and_yield get "/hello/sean" last_response.status.should == 200 last_response.body.should == "hello sean" end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
grape-librato-1.0.0 | spec/grape-librato/middleware_spec.rb |