File tree Expand file tree Collapse file tree 2 files changed +40
-40
lines changed
Expand file tree Collapse file tree 2 files changed +40
-40
lines changed Original file line number Diff line number Diff line change 1+ require 'simplecov'
2+
3+ SimpleCov . start do
4+ enable_coverage :branch
5+ add_filter "/spec/"
6+ end
7+
8+ require 'minisky'
9+ require 'pp' # needs to be included before fakefs
10+ require 'fakefs/spec_helpers'
11+ require 'webmock/rspec'
12+
13+ RSpec . configure do |config |
14+ # Enable flags like --only-failures and --next-failure
15+ config . example_status_persistence_file_path = ".rspec_status"
16+
17+ config . expect_with :rspec do |c |
18+ c . syntax = [ :should , :expect ]
19+ end
20+ end
21+
22+ module SimpleCov
23+ module Formatter
24+ class HTMLFormatter
25+ def format ( result )
26+ # silence the stdout summary, just save the html files
27+ unless @inline_assets
28+ Dir [ File . join ( @public_assets_dir , "*" ) ] . each do |path |
29+ FileUtils . cp_r ( path , asset_output_path , remove_destination : true )
30+ end
31+ end
32+
33+ File . open ( File . join ( output_path , "index.html" ) , "wb" ) do |file |
34+ file . puts template ( "layout" ) . result ( binding )
35+ end
36+ end
37+ end
38+ end
39+ end
Original file line number Diff line number Diff line change 1- require 'simplecov'
2-
3- SimpleCov . start do
4- enable_coverage :branch
5- add_filter "/spec/"
6- end
7-
8- require 'minisky'
9- require 'pp' # needs to be included before fakefs
10-
11- require 'fakefs/spec_helpers'
12- require 'webmock/rspec'
13-
14- RSpec . configure do |config |
15- # Enable flags like --only-failures and --next-failure
16- config . example_status_persistence_file_path = ".rspec_status"
17-
18- config . expect_with :rspec do |c |
19- c . syntax = [ :should , :expect ]
20- end
21- end
22-
23- module SimpleCov
24- module Formatter
25- class HTMLFormatter
26- def format ( result )
27- # silence the stdout summary, just save the html files
28- unless @inline_assets
29- Dir [ File . join ( @public_assets_dir , "*" ) ] . each do |path |
30- FileUtils . cp_r ( path , asset_output_path , remove_destination : true )
31- end
32- end
33-
34- File . open ( File . join ( output_path , "index.html" ) , "wb" ) do |file |
35- file . puts template ( "layout" ) . result ( binding )
36- end
37- end
38- end
39- end
40- end
1+ require_relative 'spec_config'
412
423INVALID_METHOD_NAMES = [
434 'getUsers' ,
You can’t perform that action at this time.
0 commit comments