Sha256: b968076cfc77587108a2422d832a4b97ca0294847e9d242d1c57348d3aadd84b

Contents?: true

Size: 656 Bytes

Versions: 4

Compression:

Stored size: 656 Bytes

Contents

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

module WhosGotDirt::Requests::Entity
  RSpec.describe Poderopedia do
    describe '#to_s' do
      it 'should return the URL to request' do
        expect(Poderopedia.new(name: 'ACME Inc.').to_s).to eq('http://api.poderopedia.org/visualizacion/search?alias=ACME+Inc.')
      end
    end

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

      context 'when given an API key' do
        include_examples 'equal', 'user_key', 'poderopedia_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/poderopedia_spec.rb
whos_got_dirt-0.0.4 spec/requests/entity/poderopedia_spec.rb
whos_got_dirt-0.0.3 spec/requests/entity/poderopedia_spec.rb
whos_got_dirt-0.0.2 spec/requests/entity/poderopedia_spec.rb