Sha256: ccc6e944d10c97eb1b8e3f7da637924edf815c4a0ee369ceec77345825ceb47f

Contents?: true

Size: 678 Bytes

Versions: 5

Compression:

Stored size: 678 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + "/test_helper")

class StatusBangTest < MiniTest::Unit::TestCase
  describe "status!" do
    before do
      DocRaptor.api_key "something something"
    end

    describe "with good arguments" do
      it "should give me a valid response" do
        stub_http_response_with("simple_status.json", :get)
        DocRaptor.status!("test-id")
      end
    end

    describe "with invalid arguments" do
      it "should raise an exception" do
        stub_http_response_with("invalid_status.xml", :get, 403)
        assert_raises(DocRaptorException::DocumentStatusFailure) {DocRaptor.status!("test-id")}
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
doc_raptor-0.3.4 test/status_bang_test.rb
doc_raptor-0.3.3 test/status_bang_test.rb
doc_raptor-0.3.2 test/status_bang_test.rb
doc_raptor-0.3.1 test/status_bang_test.rb
doc_raptor-0.3.0 test/status_bang_test.rb