Sha256: 3121ccba3f7108dbf055dbb8c794100618b57406d665a2ae8539c60e3724214c

Contents?: true

Size: 734 Bytes

Versions: 1

Compression:

Stored size: 734 Bytes

Contents

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

class ListDocsTest < MiniTest::Unit::TestCase
  describe "list_docs" do
    before do
      DocRaptor.api_key "something something"
    end

    describe "with bogus arguments" do
      it "should raise an error if something other than an options hash is passed in" do
        assert_raises(ArgumentError) {DocRaptor.list_docs(true)}
        assert_raises(ArgumentError) {DocRaptor.list_docs(nil)}
      end
    end

    describe "with good arguments" do
      it "should give me a valid response" do
        stub_http_response_with("simple_list_docs", :get)
        assert_equal file_fixture("simple_list_docs"), DocRaptor.list_docs.body
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
doc_raptor-0.2.3 test/list_docs_test.rb