Sha256: be3a2b247155da7ac3908a028f31dff1f78aca50f993a43ed4648095206bb651

Contents?: true

Size: 827 Bytes

Versions: 2

Compression:

Stored size: 827 Bytes

Contents

require File::expand_path('../../spec_helper', __FILE__)
require 'opbeat'

describe Opbeat::Client do
  before do
    @configuration = Opbeat::Configuration.new
    @configuration.environments = ["test"]
    @configuration.current_environment = :test
    @configuration.secret_token = 'test'
    @configuration.organization_id = 'test'
    @configuration.app_id = 'test'
    @client = Opbeat::Client.new(@configuration)
    allow(@client).to receive(:send)
  end

  it 'send_release should send' do
    message = "Test message"
    expect(@client).to receive(:send).with("/releases/", message)
    @client.send_release(message)
  end

  it 'send_message should send' do
    event = Opbeat::Event.new :message => "my message"
    expect(@client).to receive(:send).with("/errors/", event)
    @client.send_event(event)
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
opbeat-1.1.0 spec/opbeat/client_spec.rb
opbeat-1.0.0 spec/opbeat/client_spec.rb