Sha256: 69fb05b2e6f0bd6ed68fadff7d3e1207d4e775bdf004a8826b24a31f16d817d7

Contents?: true

Size: 600 Bytes

Versions: 1

Compression:

Stored size: 600 Bytes

Contents

require 'spec_helper'

class Client < Rapidash::Client
  method :test
end

describe Rapidash::Client do

  let!(:subject) { Client.new }

  it "should raise an error when instantiated" do
    expect {
     Rapidash::Client.new
    }.to raise_error(Rapidash::ConfigurationError)
  end

  describe ".get" do
    it "should call request" do
      subject.should_receive(:request).with(:get, "foo", {})
      subject.get("foo")
    end
  end

  describe ".post" do
    it "should call request" do
      subject.should_receive(:request).with(:post, "foo", {})
      subject.post("foo")
    end
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rapidash-0.0.2 spec/rapidash/client_spec.rb