Sha256: c4e6ce1648693cfa261c6747265ff6f458d8cc4d9583017e4ffec03458746bb5

Contents?: true

Size: 816 Bytes

Versions: 1

Compression:

Stored size: 816 Bytes

Contents

require 'blaze'
require 'webmock'

describe Blaze do
  include WebMock::API

  around do |example|
    $stderr = StringIO.new
    example.run
    $stderr = STDERR
  end

  it "can speak" do
    token = "abc"
    room_id = 1234
    account = "abcd"

    stub_request(:post, "http://#{token}:X@#{account}.campfirenow.com/room/#{room_id}/speak.json").
    with(:body => "{\"message\":{\"body\":\"Ik ben een gem aan het maken\"}}",
         :headers => {'Accept'=>'*/*', 'Content-Type'=>'application/json', 'User-Agent'=>'Blaze'}).
         to_return(:status => 200, :body => "", :headers => {})

    subject.configure do |config|
      config.account = account
      config.room_id = room_id
      config.token   = token
      config.ssl     = false
    end

    subject.speak "Ik ben een gem aan het maken"
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
blaze-0.0.1 spec/blaze/blaze_spec.rb