File tree Expand file tree Collapse file tree 4 files changed +52
-4
lines changed Expand file tree Collapse file tree 4 files changed +52
-4
lines changed Original file line number Diff line number Diff line change 1
1
FROM ubuntu:14.04
2
2
MAINTAINER Shujon Mollah
3
+ ENV DEBIAN_FRONTEND noninteractive
4
+
5
+ RUN apt-get update
6
+ RUN apt-get install -y \
7
+ wget parallel \
8
+ ruby ruby-dev \
9
+ build-essential \
10
+ fontconfig
11
+
12
+ RUN mkdir drivers
13
+ RUN wget -q -P drivers https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.7-linux-x86_64.tar.bz2
14
+ RUN tar -C drivers -xjf /drivers/phantomjs-1.9.7-linux-x86_64.tar.bz2
15
+ RUN rm -Rf /drivers/phantomjs-1.9.7-linux-x86_64.tar.bz2
16
+ RUN ln -s /drivers/phantomjs-1.9.7-linux-x86_64/bin/phantomjs /usr/bin/phantomjs
17
+ RUN chmod 755 /usr/bin/phantomjs
Original file line number Diff line number Diff line change 1
1
source "https://rubygems.org"
2
2
3
- gem "serverspec"
4
3
gem "docker-api" , "~> 1.21.4"
4
+ gem "serverspec"
5
5
gem "specinfra" , "2.12.7" # because of https://circleci.com/docs/docker#docker-exec
6
6
# Also read https://workshop.avatarnewyork.com/post/test-docker-images-with-circleci/
7
7
8
8
group :development do
9
9
gem "guard" , "~> 2.12.6"
10
+ gem "guard-rspec" , "~> 4.5.2" , require : false
10
11
gem "guard-rubocop" , "~> 1.2.0"
11
12
gem "rubocop" , "~> 0.32.0"
12
13
end
13
14
14
15
group :ci do
15
- gem "yarjuf" , "~> 2.0.0"
16
16
gem "coveralls" , "~> 0.8.1" , require : false
17
+ gem "yarjuf" , "~> 2.0.0"
17
18
end
Original file line number Diff line number Diff line change @@ -18,3 +18,31 @@ guard :rubocop, cli: ["--auto-correct"] do
18
18
watch ( /.+\. rb$/ )
19
19
watch ( %r{(?:.+/)?\. rubocop\. yml$} ) { |m | File . dirname ( m [ 0 ] ) }
20
20
end
21
+
22
+ # Note: The cmd option is now required due to the increasing number of ways
23
+ # rspec may be run, below are examples of the most common uses.
24
+ # * bundler: 'bundle exec rspec'
25
+ # * bundler binstubs: 'bin/rspec'
26
+ # * spring: 'bin/rspec' (This will use spring if running and you have
27
+ # installed the spring binstubs per the docs)
28
+ # * zeus: 'zeus rspec' (requires the server to be started separately)
29
+ # * 'just' rspec: 'rspec'
30
+
31
+ guard :rspec , cmd : "bundle exec rspec" do
32
+ require "guard/rspec/dsl"
33
+ dsl = Guard ::RSpec ::Dsl . new ( self )
34
+
35
+ # Feel free to open issues for suggestions and improvements
36
+
37
+ # RSpec files
38
+ rspec = dsl . rspec
39
+ watch ( rspec . spec_helper ) { rspec . spec_dir }
40
+ watch ( rspec . spec_support ) { rspec . spec_dir }
41
+ watch ( rspec . spec_files )
42
+
43
+ watch ( "Dockerfile" ) { rspec . spec_dir }
44
+
45
+ # Ruby files
46
+ ruby = dsl . ruby
47
+ dsl . watch_spec_files_for ( ruby . lib_files )
48
+ end
Original file line number Diff line number Diff line change @@ -22,11 +22,15 @@ def remove(_options = {}); end
22
22
expect ( os_version ) . to include "Ubuntu 14"
23
23
end
24
24
25
- xit "installs required packages " do
26
- expect ( package ( "phantomjs" ) ) . to be_installed
25
+ it "installs the right version of phantomjs " do
26
+ expect ( phantomjs_version ) . to eq "1.9.7"
27
27
end
28
28
29
29
def os_version
30
30
command ( "lsb_release -a" ) . stdout
31
31
end
32
+
33
+ def phantomjs_version
34
+ command ( "phantomjs --version" ) . stdout . strip
35
+ end
32
36
end
You can’t perform that action at this time.
0 commit comments