spec/git_trend/scraper_spec.rb in git-trend-0.1.1 vs spec/git_trend/scraper_spec.rb in git-trend-0.1.2
- old
+ new
@@ -1,15 +1,16 @@
require 'spec_helper'
include GitTrend
RSpec.describe GitTrend::Scraper do
- describe 'proxy settings' do
+ describe 'settings' do
before do
allow(ENV).to receive(:[]).with('http_proxy').and_return('http://proxy_user:proxy_pass@192.168.1.99:9999')
@scraper = Scraper.new
end
subject { @scraper.instance_variable_get(:@agent) }
+ its(:user_agent) { should eq "git-trend #{VERSION}" }
its(:proxy_addr) { should eq '192.168.1.99' }
its(:proxy_user) { should eq 'proxy_user' }
its(:proxy_pass) { should eq 'proxy_pass' }
its(:proxy_port) { should eq 9999 }
end