Sha256: 1a06cd9b0794026b6ce00e0702c94ad60ed4ef5fb11464802702efa008106223

Contents?: true

Size: 793 Bytes

Versions: 1

Compression:

Stored size: 793 Bytes

Contents

require 'spec_helper'

describe PictureFrom::TwitterPicture do

  describe '#picture_from_username' do
    subject { described_class.new }

    it 'returns the image url' do
      fake('https://twitter.com/g_carreiro', file: 'twitter_crawler.response')
      link = subject.picture_from_username('g_carreiro')
      expect(link).to eq('https://pbs.twimg.com/profile_images/524721838002143233/nNdh6ftm_400x400.jpeg')
    end
  end

  describe 'online tests', online: true do

    describe '#picture_from_username' do
      subject { described_class.new }

      it 'returns the image url' do
        link = subject.picture_from_username('unclebobmartin')
        expect(link).to eq('https://pbs.twimg.com/profile_images/1102364992/clean_code_72_color_400x400.png')
      end
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
picture_from-1.0.1 spec/lib/picture_from/twitter_picture_spec.rb