Sha256: c2658596e0756387e790a91bcbc2cf87888e6d20fa468e1ec47d260fd648a7f1

Contents?: true

Size: 727 Bytes

Versions: 1

Compression:

Stored size: 727 Bytes

Contents

require 'spec_helper'

describe 'CrashHook::Request' do
  class RequestTester
    extend CrashHook::Request
  end
  
  before :all do
    CrashHook::Configuration::ALLOWED_METHODS.each do |m|  
      FakeWeb.register_uri(m, "http://localhost:4567/test", :body => "")
    end
  end
    
  it 'sends a GET request' do
    RequestTester.get('http://localhost:4567/test', {:foo => 'bar'})
  end
  
  it 'sends a POST request' do
    RequestTester.post('http://localhost:4567/test', {:foo => 'bar'})
  end
  
  it 'sends a PUT request' do
    RequestTester.put('http://localhost:4567/test', {:foo => 'bar'})
  end
  
  it 'sends a DELETE request' do
    RequestTester.delete('http://localhost:4567/test', {:foo => 'bar'})
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
crash_hook-0.2.0 spec/request_spec.rb