Sha256: 0eb4e9d27b73680747baeb4da4e042eaee9c900b95e9374f335e850571c583a7

Contents?: true

Size: 638 Bytes

Versions: 4

Compression:

Stored size: 638 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')

module WhosGotDirt::Requests::Entity
  RSpec.describe OpenDuka do
    describe '#to_s' do
      it 'should return the URL to request' do
        expect(OpenDuka.new(name: 'ACME Inc.').to_s).to eq('http://www.openduka.org/index.php/api/search?term=ACME+Inc.')
      end
    end

    describe '#convert' do
      context 'when given a name' do
        include_examples 'match', 'term', 'name', ['ACME Inc.', 'Inc. ACME']
      end

      context 'when given an API key' do
        include_examples 'equal', 'key', 'open_duka_api_key', 123
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
whos_got_dirt-0.0.5 spec/requests/entity/open_duka_spec.rb
whos_got_dirt-0.0.4 spec/requests/entity/open_duka_spec.rb
whos_got_dirt-0.0.3 spec/requests/entity/open_duka_spec.rb
whos_got_dirt-0.0.2 spec/requests/entity/open_duka_spec.rb