Sha256: 9fa48c9f862752461eff08c36e4e5b810c85f66ea69846c82ff0efa81157ad18

Contents?: true

Size: 495 Bytes

Versions: 5

Compression:

Stored size: 495 Bytes

Contents

require 'spec_helper'

describe NewRelic::Agent::Instrumentation::Grape do

  subject { Class.new(Grape::API) }

  def app
    subject
  end

  before do
    subject.get :hello do
      "Hello World"
    end
  end

  it "perform_action_with_newrelic_trace" do
    NewRelic::Agent::Instrumentation::Grape.any_instance.should_receive(:perform_action_with_newrelic_trace).and_yield
    get "/hello"
    last_response.status.should == 200
    last_response.body.should == "Hello World"
  end

end


Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
newrelic-grape-1.3.1 spec/newrelic-grape/instrumenter_spec.rb
newrelic-grape-1.3.0 spec/newrelic-grape/instrumenter_spec.rb
newrelic-grape-1.2.1 spec/newrelic-grape/instrumenter_spec.rb
newrelic-grape-1.2.0 spec/newrelic-grape/instrumenter_spec.rb
newrelic-grape-1.1.0 spec/newrelic-grape/instrumenter_spec.rb