rspec_n 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG.md +11 -5
- data/Gemfile +2 -0
- data/LICENSE.md +1 -1
- data/README.md +43 -19
- data/exe/rspec_n +1 -5
- data/lib/rspec_n.rb +1 -1
- data/lib/rspec_n/formatters/file_formatter.rb +2 -2
- data/lib/rspec_n/formatters/table_formatter.rb +26 -15
- data/lib/rspec_n/helpers/core_ext/string.rb +4 -0
- data/lib/rspec_n/input.rb +19 -13
- data/lib/rspec_n/run.rb +28 -12
- data/lib/rspec_n/runner.rb +3 -7
- data/lib/rspec_n/version.rb +1 -1
- data/rspec_n.gemspec +1 -0
- metadata +4 -6
- data/lib/rspec_n/errors.rb +0 -2
- data/lib/rspec_n/errors/bad_argument.rb +0 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 02e086ee01e65f0ac9e1352f77e8ed372a999284
|
4
|
+
data.tar.gz: 9a2b8f3caaf24bb2812dd8f90520df1edf5ab6e3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7f896ea775b492f458322bbffc031346e2cb5406e47d6d46103b1ddc251e9b632b4b733ba4ed8d44501da9501834869c7929fc1dccb9a230c1321d2dc2d501a5
|
7
|
+
data.tar.gz: eb1ecd8d5a36d39572fec169a4997e347f3328496aab16960b3db7aab41f472d26ee7c02c91ecf8e7432b0effcb1b27c75276b89b24f4ab2728fd64a0efa404a
|
data/CHANGELOG.md
CHANGED
@@ -1,8 +1,14 @@
|
|
1
1
|
# CHANGELOG
|
2
2
|
|
3
|
-
##
|
3
|
+
## 1.1.0 (Mar 03, 2019)
|
4
4
|
|
5
|
-
1. (New) Add
|
6
|
-
1. (New)
|
7
|
-
1. (New)
|
8
|
-
|
5
|
+
1. (New) Add **Result Counts** column which shows the result counts for each run (e.g. "400 examples, 2 failures, 3 pending" ). ([Issue #19](https://github.com/roberts1000/rspec_n/issues/19))
|
6
|
+
1. (New) Allow an optional path argument, that is passed to RSpec, to target specs (e.g. `rspec_n 3 spec/features/example_spec.rb`, `rspec_n spec/features/example_spec.rb:5`, `rspec_n spec/features 4`). ([Issue #20](https://github.com/roberts1000/rspec_n/issues/20))
|
7
|
+
1. (New) Rename the `Result Counts` column to `Results` and remove the existing `Results` column. ([Issue #23](https://github.com/roberts1000/rspec_n/issues/23))
|
8
|
+
|
9
|
+
## 1.0.0 (Feb 18, 2019)
|
10
|
+
|
11
|
+
1. (New) Add initial core logic. ([Issue #1](https://github.com/roberts1000/rspec_n/issues/1))
|
12
|
+
1. (New) Add initial CLI. ([Issue #4](https://github.com/roberts1000/rspec_n/issues/4))
|
13
|
+
1. (New) Write results of each iteration to a separate file. ([Issue #5](https://github.com/roberts1000/rspec_n/issues/5))
|
14
|
+
1. (New) Add `-s` option to stop on first failure. ([Issue #6](https://github.com/roberts1000/rspec_n/issues/6))
|
data/Gemfile
CHANGED
data/LICENSE.md
CHANGED
data/README.md
CHANGED
@@ -2,12 +2,16 @@
|
|
2
2
|
|
3
3
|
rspec_n is a Ruby gem that makes it easy to run a project's RSpec test suite N times. You can customize the command that is used to start RSpec, or let rspec_n guess the best command (based on the files in your project). rspec_n is useful for finding repeatability or flakiness issues in automated test suites.
|
4
4
|
|
5
|
-
![
|
5
|
+
![example](https://user-images.githubusercontent.com/2053901/53691471-c6956880-3d4c-11e9-8248-68bbb4c24786.png)
|
6
6
|
|
7
7
|
## Version Policy
|
8
8
|
|
9
9
|
Releases are versioned using [semver 2.0.0](https://semver.org/spec/v2.0.0.html).
|
10
10
|
|
11
|
+
## Supported Rubies
|
12
|
+
|
13
|
+
Ruby 2.3.7+ is supported.
|
14
|
+
|
11
15
|
## Installation
|
12
16
|
|
13
17
|
Install by executing
|
@@ -18,43 +22,63 @@ The gem will install an exectuable called `rspec_n` on your system. You may als
|
|
18
22
|
|
19
23
|
## Usage
|
20
24
|
|
21
|
-
|
25
|
+
The simplest way to run rspec_n is to give it a positive integer which tells it how many times to run RSpec:
|
22
26
|
|
23
|
-
$ rspec_n
|
27
|
+
$ rspec_n 5
|
24
28
|
|
25
|
-
|
29
|
+
As each iteration completes, output will be sent to the screen and dumped to a file. If you need to examine the detailed output of a run, it is available in the output files.
|
26
30
|
|
27
|
-
|
31
|
+
You can also list one or more paths to target specs. You can do anything you would normally do when giving RSpec paths:
|
28
32
|
|
29
|
-
|
33
|
+
$ rspec_n 5 spec/path/to/something_spec.rb
|
34
|
+
$ rspec_n 5 spec/path/to/folder spec/path/to/some/other/file_spec.rb
|
35
|
+
$ rspec_n 5 spec/path/to/folder
|
36
|
+
$ rspec_n 5 spec/path/to/something_spec.rb:5
|
30
37
|
|
31
|
-
|
38
|
+
By default, `--order rand` is sent to RSpec to force it to run specs in random order. You can use a `defined` order if you don't want randomness:
|
32
39
|
|
33
|
-
|
40
|
+
$ rspec_n 5 --order defined
|
34
41
|
|
35
|
-
|
42
|
+
Or, let the configuration files in the project determine the order:
|
43
|
+
|
44
|
+
$ rspec_n 5 --order project
|
45
|
+
|
46
|
+
#### Automatic Command Selection
|
47
|
+
|
48
|
+
rspec_n will inspect the files in your project and pick the best way to start RSpec. If it can't make an educated guess, it will use `bundle exec rspec` as the base command and add any extra information you've entered on the command line (like the order or paths). The following is a list of project types that rspec_n can identify and the associated commands it will try to execute:
|
36
49
|
|
37
|
-
|
50
|
+
1. Ruby on Rails Applications: `DISABLE_DATABASE_ENVIRONMENT_CHECK=1 RAILS_ENV=test bundle exec rake db:drop db:create db:migrate && bundle exec rspec`.
|
51
|
+
2. Everything else: `bundle exec rspec`.
|
38
52
|
|
39
|
-
####
|
53
|
+
#### Use Custom Command to Start RSpec
|
54
|
+
|
55
|
+
If you don't want rspec_n to automatically pick the best command, you can use the `-c` option and specify a command. The following example deletes the `tmp` folder before starting RSpec:
|
40
56
|
|
41
|
-
rspec_n
|
57
|
+
$ rspec_n 5 -c 'rm -rf tmp && bundle exec rspec'
|
42
58
|
|
43
|
-
|
44
|
-
1. `--order defined` - Passes `--order defined` to RSpec which causes RSpec to run your specs in the order that they are loaded by RSpec.
|
45
|
-
1. `--order project` - Passes nothing to RSpec, which means the project configuration files will determine the order.
|
59
|
+
There are couple points to consider:
|
46
60
|
|
47
|
-
|
61
|
+
1. Wrap your entire command in a single or double quoted string so rspec_n can acturately determine the command.
|
62
|
+
1. You can use the `&&` operator to join commands.
|
63
|
+
1. rspec_n was partially created to help discover flaky test suites so it will add `--order rand` to a custom command even if don't specify the order. You must explicitly use `--order defined` or `--order project` if you want something else.
|
48
64
|
|
49
|
-
#### Control File
|
65
|
+
#### Control File Output
|
50
66
|
|
51
67
|
rspec_n writes output for each iteration in a sequence of files `rspec_n_iteration.1`, `rspec_n_iteration.2`, etc... This saves you from having to rerun your test suite when you find a particular seed that causes your test suite to fail. If you want to disable this, add the `--no-file` option to the command.
|
52
68
|
|
53
|
-
|
69
|
+
$ rspec_n 5 --no-file
|
70
|
+
|
71
|
+
**Note:** rspec_n deletes all files matching `rspec_n_iteration.*` when it starts so be sure tomove those files to another location if you want to save them.
|
54
72
|
|
55
73
|
#### Stop on First Failure
|
56
74
|
|
57
|
-
You can tell rspec_n to abort
|
75
|
+
You can tell rspec_n to abort the first time an iteration fails by using the `-s` flag. Any remaining iterations will be skipped.
|
76
|
+
|
77
|
+
## Understanding the Results
|
78
|
+
|
79
|
+
rspec_n uses the STDOUT, STDERR and EXIT STATUS of the `rspec` command to figure out what to show in the **Results** column. The general results are determined by finding the line in RSpec's STDOUT that says `xyz examples, xyz failures, xyz pending`. rspec_n considers the run to be successful if RSpec returns an EXIT STATUS of 0 **regardless of any content in the STDERR stream**; it considers the run to be a failure if RSpec's EXIT STATUS > 0.
|
80
|
+
|
81
|
+
There are times when RSpec's STDERR might have content, even though it returns an EXIT STATUS of 0. This frequently happens with deprecation notices and RSpec itself will pass the test suite in this situation. Unfortunately, it's not uncommon for code to write messages that look like errors to STDERR, but not actually raise an error and cause RSpec to fail a spec example. rspec_n reports this situation by adding a `(Warning)` label to the results to indicate there's something extra in the STDERR that you might want to investigate.
|
58
82
|
|
59
83
|
## Development
|
60
84
|
|
data/exe/rspec_n
CHANGED
@@ -16,7 +16,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
16
16
|
|
17
17
|
require "cri"
|
18
18
|
require "rspec_n/constants"
|
19
|
-
require "rspec_n/errors"
|
19
|
+
require "rspec_n/errors/bad_option"
|
20
20
|
|
21
21
|
# rubocop:disable Metrics/BlockLength
|
22
22
|
command = Cri::Command.define do
|
@@ -64,10 +64,6 @@ end
|
|
64
64
|
begin
|
65
65
|
command.run(ARGV)
|
66
66
|
exit 0
|
67
|
-
# Raised when the user specifies an argument incorrectly.
|
68
|
-
rescue RspecN::BadArgument => e
|
69
|
-
warn e.message.colorize(:red)
|
70
|
-
exit 1
|
71
67
|
rescue RspecN::BadOption => e
|
72
68
|
warn e.message.colorize(:red)
|
73
69
|
exit 1
|
data/lib/rspec_n.rb
CHANGED
@@ -3,7 +3,7 @@ module RspecN
|
|
3
3
|
class FileFormatter
|
4
4
|
include RspecN::TimeHelpers
|
5
5
|
|
6
|
-
BASE_FILE_NAME = "rspec_n_iteration"
|
6
|
+
BASE_FILE_NAME = "rspec_n_iteration".freeze
|
7
7
|
|
8
8
|
def initialize(runner:)
|
9
9
|
@runner = runner
|
@@ -12,7 +12,7 @@ module RspecN
|
|
12
12
|
end
|
13
13
|
|
14
14
|
def delete_all_files
|
15
|
-
Dir.glob("#{BASE_FILE_NAME}.**").each { |file| File.delete(file)}
|
15
|
+
Dir.glob("#{BASE_FILE_NAME}.**").each { |file| File.delete(file) }
|
16
16
|
end
|
17
17
|
|
18
18
|
def write(run)
|
@@ -7,7 +7,14 @@ module RspecN
|
|
7
7
|
|
8
8
|
def initialize(runner:)
|
9
9
|
@runner = runner
|
10
|
-
@columns = {
|
10
|
+
@columns = {
|
11
|
+
"Run" => 7,
|
12
|
+
"Start Time" => 21,
|
13
|
+
"Finish Time" => 21,
|
14
|
+
"Duration" => 12,
|
15
|
+
"Seed" => 9,
|
16
|
+
"Results" => 50
|
17
|
+
}
|
11
18
|
@header_columns_string = padded_header_column_labels
|
12
19
|
@table_width = @header_columns_string.size
|
13
20
|
@format = "%m/%d %l:%M:%S %p"
|
@@ -28,7 +35,7 @@ module RspecN
|
|
28
35
|
print pad_field("Finish Time", run.formatted_finish_time(@format))
|
29
36
|
print duration_field(run)
|
30
37
|
print seed_field(run)
|
31
|
-
puts
|
38
|
+
puts result_count_field(run)
|
32
39
|
end
|
33
40
|
|
34
41
|
private
|
@@ -41,12 +48,11 @@ module RspecN
|
|
41
48
|
def write_conclusion
|
42
49
|
puts "-" * @table_width
|
43
50
|
puts ""
|
44
|
-
puts "Total Duration:
|
45
|
-
puts "
|
46
|
-
puts "
|
47
|
-
puts "
|
48
|
-
puts "
|
49
|
-
puts "Total Skipped: #{@runner.total_skipped}"
|
51
|
+
puts "Total Duration: #{convert_seconds_to_hms(@runner.total_duration_seconds)}"
|
52
|
+
puts "Avg Run Duration: #{convert_seconds_to_hms(@runner.avg_duration_seconds)}"
|
53
|
+
puts "Runs Passed: #{@runner.total_passed.to_s.colorize(:green)}"
|
54
|
+
puts "Runs Failed: #{@runner.total_failed.to_s.colorize(:red)}"
|
55
|
+
puts "Runs Skipped: #{@runner.total_skipped}"
|
50
56
|
puts ""
|
51
57
|
end
|
52
58
|
|
@@ -65,7 +71,7 @@ module RspecN
|
|
65
71
|
|
66
72
|
def pad_field(column_name, value)
|
67
73
|
max_width = max_column_width_for(column_name)
|
68
|
-
value_size = value.to_s.size
|
74
|
+
value_size = value.to_s.remove_color.size
|
69
75
|
pad_count = max_width - value_size
|
70
76
|
value.to_s + (" " * pad_count)
|
71
77
|
end
|
@@ -79,13 +85,18 @@ module RspecN
|
|
79
85
|
run.seed.nil? ? pad_field("Seed", "None") : pad_field("Seed", run.seed)
|
80
86
|
end
|
81
87
|
|
82
|
-
def
|
88
|
+
def result_count_field(run)
|
89
|
+
warning_part = run.has_warnings? ? " (Warnings)".colorize(:yellow) : ""
|
90
|
+
run.result_count_string.colorize(result_color_symbol(run)) + warning_part
|
91
|
+
end
|
92
|
+
|
93
|
+
def result_color_symbol(run)
|
83
94
|
case run.status_string
|
84
|
-
when "Pass
|
85
|
-
when "Pass" then
|
86
|
-
when "Fail" then
|
87
|
-
when "Skip" then
|
88
|
-
else
|
95
|
+
when "Pass (Warnings)" then :green
|
96
|
+
when "Pass" then :green
|
97
|
+
when "Fail" then :red
|
98
|
+
when "Skip" then :yellow
|
99
|
+
else :yellow
|
89
100
|
end
|
90
101
|
end
|
91
102
|
end
|
data/lib/rspec_n/input.rb
CHANGED
@@ -3,11 +3,12 @@ module RspecN
|
|
3
3
|
attr_accessor :iterations, :command, :stop_fast, :write_files
|
4
4
|
def initialize(options, args)
|
5
5
|
@args = args
|
6
|
+
@unprocessed_args_array = args.entries
|
6
7
|
@options = options
|
7
|
-
validate_args
|
8
|
-
validate_order
|
9
8
|
@iterations = determine_iterations
|
10
|
-
@
|
9
|
+
@spec_path = determine_spec_path
|
10
|
+
validate_order
|
11
|
+
@order = @options.fetch(:order, "rand")
|
11
12
|
@command = determine_command
|
12
13
|
@stop_fast = options.fetch(:"stop-fast", false)
|
13
14
|
@write_files = !options.fetch(:'no-file', false)
|
@@ -19,12 +20,6 @@ module RspecN
|
|
19
20
|
|
20
21
|
private
|
21
22
|
|
22
|
-
def validate_args
|
23
|
-
return if @args.size.zero?
|
24
|
-
raise BadArgument, @args.join(', ') if @args.empty? || !@args.first.all_digits?
|
25
|
-
raise BadArgument, @args.first if @args.first.to_i < 1
|
26
|
-
end
|
27
|
-
|
28
23
|
def validate_order
|
29
24
|
return unless (order = @options.fetch(:order, nil))
|
30
25
|
|
@@ -32,13 +27,24 @@ module RspecN
|
|
32
27
|
end
|
33
28
|
|
34
29
|
def determine_iterations
|
35
|
-
|
30
|
+
value = @unprocessed_args_array.detect(&:all_digits?)
|
31
|
+
|
32
|
+
if value
|
33
|
+
@unprocessed_args_array.delete(value)
|
34
|
+
value.to_i
|
35
|
+
else
|
36
|
+
RspecN::DEFAULT_ITERATIONS
|
37
|
+
end
|
36
38
|
end
|
37
39
|
|
38
|
-
def
|
39
|
-
|
40
|
+
def determine_spec_path
|
41
|
+
@unprocessed_args_array.empty? ? nil : @unprocessed_args_array.join(" ")
|
42
|
+
end
|
40
43
|
|
41
|
-
|
44
|
+
def determine_command
|
45
|
+
command = @options.fetch(:command, guessed_command)
|
46
|
+
command += " " + @spec_path if @spec_path
|
47
|
+
command + " --order " + @order
|
42
48
|
end
|
43
49
|
|
44
50
|
def guessed_command
|
data/lib/rspec_n/run.rb
CHANGED
@@ -1,18 +1,21 @@
|
|
1
1
|
module RspecN
|
2
2
|
class Run
|
3
|
-
attr_accessor :
|
3
|
+
attr_accessor :duration_seconds, :finish_time, :iteration, :result_count_string, :rspec_stdout, :rspec_stderr, :rspec_status,
|
4
|
+
:seed, :status_string, :start_time
|
4
5
|
|
5
6
|
def initialize(iteration:)
|
6
|
-
@iteration = iteration
|
7
|
-
@start_time = nil
|
8
|
-
@finish_time = nil
|
9
7
|
@duration_seconds = nil
|
10
|
-
@
|
8
|
+
@finish_time = nil
|
9
|
+
@has_warnings = nil
|
10
|
+
@iteration = iteration
|
11
|
+
@result_count_string = nil
|
11
12
|
@rspec_stdout = nil
|
12
13
|
@rspec_stderr = nil
|
13
14
|
@rspec_status = nil
|
14
|
-
@
|
15
|
+
@seed = nil
|
15
16
|
@skipped = false
|
17
|
+
@status_string = nil
|
18
|
+
@start_time = nil
|
16
19
|
end
|
17
20
|
|
18
21
|
def start_clock
|
@@ -24,6 +27,8 @@ module RspecN
|
|
24
27
|
finalize_duration_seconds
|
25
28
|
finalize_seed
|
26
29
|
finalize_status_string
|
30
|
+
finalize_result_count_string
|
31
|
+
finalize_has_warnings
|
27
32
|
end
|
28
33
|
|
29
34
|
def go(command)
|
@@ -38,12 +43,12 @@ module RspecN
|
|
38
43
|
finish_time.strftime(format)
|
39
44
|
end
|
40
45
|
|
41
|
-
def
|
42
|
-
@
|
46
|
+
def has_warnings?
|
47
|
+
@has_warnings
|
43
48
|
end
|
44
49
|
|
45
|
-
def
|
46
|
-
@status_string == "Pass
|
50
|
+
def passed?
|
51
|
+
@status_string == "Pass"
|
47
52
|
end
|
48
53
|
|
49
54
|
def skip
|
@@ -67,17 +72,28 @@ module RspecN
|
|
67
72
|
|
68
73
|
def finalize_seed
|
69
74
|
result = @rspec_stdout.match(/^Randomized with seed (\d*)/)
|
70
|
-
return if result.nil?
|
75
|
+
return if result.nil? # A seed wasn't used
|
71
76
|
|
72
77
|
@seed = result.captures.first&.strip
|
73
78
|
end
|
74
79
|
|
80
|
+
# rubocop:disable Style/NegatedIf
|
75
81
|
def finalize_status_string
|
76
82
|
return @status_string = "Skip" if skipped?
|
77
|
-
return @status_string = "Pass with Warnings" if @rspec_status.exitstatus.zero? && !@rspec_stderr.empty?
|
78
83
|
return @status_string = "Pass" if @rspec_status.exitstatus.zero?
|
79
84
|
return @status_string = "Fail" if !@rspec_status.exitstatus.zero?
|
85
|
+
|
80
86
|
@status_string = "Undetermined"
|
81
87
|
end
|
88
|
+
# rubocop:enable Style/NegatedIf
|
89
|
+
|
90
|
+
def finalize_result_count_string
|
91
|
+
result = @rspec_stdout.match(/\d*\s+examples?,\s+\d*\s+failures?(,\s+\d*\s+pending)*/)
|
92
|
+
@result_count_string = result ? result.to_s : ""
|
93
|
+
end
|
94
|
+
|
95
|
+
def finalize_has_warnings
|
96
|
+
@has_warnings = @rspec_status.exitstatus.zero? && !@rspec_stderr.empty?
|
97
|
+
end
|
82
98
|
end
|
83
99
|
end
|
data/lib/rspec_n/runner.rb
CHANGED
@@ -25,19 +25,15 @@ module RspecN
|
|
25
25
|
end
|
26
26
|
|
27
27
|
def total_passed
|
28
|
-
@runs.values.select
|
29
|
-
end
|
30
|
-
|
31
|
-
def total_passed_with_warnings
|
32
|
-
@runs.values.select { |run| run.passed_with_warnings? }.size
|
28
|
+
@runs.values.select(&:passed?).size
|
33
29
|
end
|
34
30
|
|
35
31
|
def total_failed
|
36
|
-
@runs.values.select
|
32
|
+
@runs.values.select(&:failed?).size
|
37
33
|
end
|
38
34
|
|
39
35
|
def total_skipped
|
40
|
-
@runs.values.select
|
36
|
+
@runs.values.select(&:skipped?).size
|
41
37
|
end
|
42
38
|
|
43
39
|
private
|
data/lib/rspec_n/version.rb
CHANGED
data/rspec_n.gemspec
CHANGED
@@ -33,6 +33,7 @@ Gem::Specification.new do |spec|
|
|
33
33
|
spec.bindir = "exe"
|
34
34
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
35
35
|
spec.require_paths = ["lib"]
|
36
|
+
spec.required_ruby_version = '>= 2.3.7'
|
36
37
|
|
37
38
|
spec.add_development_dependency "bundler", "~> 2.0"
|
38
39
|
spec.add_development_dependency "pry", "~> 0.11.2"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rspec_n
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- roberts1000
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-03-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -116,8 +116,6 @@ files:
|
|
116
116
|
- exe/rspec_n
|
117
117
|
- lib/rspec_n.rb
|
118
118
|
- lib/rspec_n/constants.rb
|
119
|
-
- lib/rspec_n/errors.rb
|
120
|
-
- lib/rspec_n/errors/bad_argument.rb
|
121
119
|
- lib/rspec_n/errors/bad_option.rb
|
122
120
|
- lib/rspec_n/formatters/file_formatter.rb
|
123
121
|
- lib/rspec_n/formatters/table_formatter.rb
|
@@ -144,7 +142,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
144
142
|
requirements:
|
145
143
|
- - ">="
|
146
144
|
- !ruby/object:Gem::Version
|
147
|
-
version:
|
145
|
+
version: 2.3.7
|
148
146
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
149
147
|
requirements:
|
150
148
|
- - ">="
|
@@ -152,7 +150,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
152
150
|
version: '0'
|
153
151
|
requirements: []
|
154
152
|
rubyforge_project:
|
155
|
-
rubygems_version: 2.
|
153
|
+
rubygems_version: 2.6.14
|
156
154
|
signing_key:
|
157
155
|
specification_version: 4
|
158
156
|
summary: A ruby gem that runs RSpec N times.
|
data/lib/rspec_n/errors.rb
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
module RspecN
|
2
|
-
class BadArgument < StandardError
|
3
|
-
def initialize(msg="")
|
4
|
-
@details = msg
|
5
|
-
super
|
6
|
-
end
|
7
|
-
|
8
|
-
def message
|
9
|
-
"There was an error with the argument. rspec_n only accepts a single argument, a number greater than 0, which \n" \
|
10
|
-
"specifies how times RSpec should run. You entered:\n\n"\
|
11
|
-
" #{@details}\n\n" \
|
12
|
-
"Here are some example ways to use rspec_n (some of these may not be valid for your particular test suite):\n\n" \
|
13
|
-
" rspec_n 5\n" \
|
14
|
-
" rspec_n 3 --command 'bundle exec rspec'\n" \
|
15
|
-
" rspec_n --command 'bin/rails db:test:prepare && bundle exec rspec'"
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|