Skip to content
This repository was archived by the owner on May 14, 2018. It is now read-only.

Commit de51f88

Browse files
committed
Add library specs
1 parent 1086292 commit de51f88

File tree

4 files changed

+14
-1
lines changed

4 files changed

+14
-1
lines changed

Jenkinsfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,11 @@ pipeline {
4040
sh("docker run --rm -e COVERAGE=requests -i smartbox/cell:${GIT_COMMIT} bundle exec rspec spec/requests")
4141
}
4242
}
43+
stage("Library specs") {
44+
steps {
45+
sh("docker run --rm -e COVERAGE=lib -i smartbox/cell:${GIT_COMMIT} bundle exec rspec spec/lib")
46+
}
47+
}
4348
stage("All specs") {
4449
steps {
4550
sh("docker run --rm -i smartbox/cell:${GIT_COMMIT} bundle exec rspec")

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
SPEC ?= spec
22

3-
.PHONY: all build spec brakeman
3+
.PHONY: all build spec models requests lib rubocop brakeman update
44

55
all: build spec brakeman
66

@@ -22,6 +22,9 @@ models:
2222
requests:
2323
docker run --rm -e COVERAGE=requests -v `pwd`:/cell -it cell:latest bundle exec rspec spec/requests
2424

25+
lib:
26+
docker run --rm -e COVERAGE=lib -v `pwd`:/cell -it cell:latest bundle exec rspec spec/lib
27+
2528
rubocop:
2629
docker run --rm -v `pwd`:/cell -it cell:latest bundle exec rubocop -D
2730

spec/lib/.gitkeep

Whitespace-only changes.

spec/spec_helper.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ def matches?(source_file)
77
source_file.filename !~ /app\/models/
88
when :requests
99
source_file.filename !~ /app\/controllers/
10+
when :lib
11+
source_file.filename !~ /app\/lib/
1012
end
1113
end
1214
end
@@ -19,6 +21,9 @@ def matches?(source_file)
1921
when "requests"
2022
add_filter SubsetFilesFilter.new(:requests)
2123
coverage_dir "coverage-requests"
24+
when "lib"
25+
add_filter SubsetFilesFilter.new(:lib)
26+
coverage_dir "coverage-lib"
2227
end
2328
end
2429

0 commit comments

Comments
 (0)