Skip to content
This repository has been archived by the owner on Jan 4, 2024. It is now read-only.

Commit

Permalink
Fix travis build
Browse files Browse the repository at this point in the history
  • Loading branch information
mgrachev committed Jan 24, 2016
1 parent a3656c5 commit 3456858
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
8 changes: 7 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
dist: trusty
language: ruby
rvm:
- 2.1.7
- 2.2.3
- 2.3.0
- 2.3.0
before_install:
- mkdir travis-phantomjs
- wget https://s3.amazonaws.com/travis-phantomjs/phantomjs-2.0.0-ubuntu-12.04.tar.bz2 -O $PWD/travis-phantomjs/phantomjs-2.0.0-ubuntu-12.04.tar.bz2
- tar -xvf $PWD/travis-phantomjs/phantomjs-2.0.0-ubuntu-12.04.tar.bz2 -C $PWD/travis-phantomjs
- export PATH=$PWD/travis-phantomjs:$PATH
3 changes: 0 additions & 3 deletions spec/gastly/screenshot_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,10 @@
expect(Phantomjs).to receive(:run)
expect(Phantomjs).to receive(:proxy_host=).with(params[:proxy_host])
expect(Phantomjs).to receive(:proxy_port=).with(params[:proxy_port])
expect_any_instance_of(Gastly::Image).to receive(:initialize)
Gastly::Screenshot.new(url, params).capture
end

it 'runs js script' do
expect_any_instance_of(Gastly::Image).to receive(:initialize)

screenshot = Gastly::Screenshot.new(url, params)
cookies = params[:cookies].map { |key, value| "#{key}=#{value}" }.join(',')
args = [
Expand Down
4 changes: 1 addition & 3 deletions spec/gastly_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@
it 'creates a screenshot' do
tmp = 'spec/support/tmp'
path = "#{tmp}/output.png"
expect(Dir.glob("#{tmp}/*").length).to eq 0
Gastly.capture(url, path)
expect(Dir.glob("#{tmp}/*").length).to eq 1
expect { Gastly.capture(url, path) }.to change { Dir.glob("#{tmp}/*").length }.by(1)
FileUtils.rm Dir.glob("#{tmp}/*")
end
end
Expand Down
Empty file added spec/support/tmp/.keep
Empty file.

0 comments on commit 3456858

Please sign in to comment.