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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA256:
3
- metadata.gz: 779f827fe4de372504a3fa7c5d4168914b4a0c3d51c05f7e441cf94ecd6953ba
4
- data.tar.gz: 928f1f99ec404b2f3a65d07542521658dfb1296e0ed5e9e5623f256b22789db8
2
+ SHA1:
3
+ metadata.gz: 02e086ee01e65f0ac9e1352f77e8ed372a999284
4
+ data.tar.gz: 9a2b8f3caaf24bb2812dd8f90520df1edf5ab6e3
5
5
  SHA512:
6
- metadata.gz: b5f002fde7c4a9ad096a17abfe21a836efa53a9ce42c3d8ad94de3df68213455555f2fe5e21bd808f3a883cfa8591f9401bb925adc3e3afe5e084ccd290b2280
7
- data.tar.gz: 48060eb007f625e03ab00e498b2c5cdf2fd365b59fb658978549a527b438bc000f988c875ff960e4f5618dd4804627b06bf1cf9852fc5d4fe4e31b10c5dc4133
6
+ metadata.gz: 7f896ea775b492f458322bbffc031346e2cb5406e47d6d46103b1ddc251e9b632b4b733ba4ed8d44501da9501834869c7929fc1dccb9a230c1321d2dc2d501a5
7
+ data.tar.gz: eb1ecd8d5a36d39572fec169a4997e347f3328496aab16960b3db7aab41f472d26ee7c02c91ecf8e7432b0effcb1b27c75276b89b24f4ab2728fd64a0efa404a
data/CHANGELOG.md CHANGED
@@ -1,8 +1,14 @@
1
1
  # CHANGELOG
2
2
 
3
- ## Next Release
3
+ ## 1.1.0 (Mar 03, 2019)
4
4
 
5
- 1. (New) Add initial core logic. (Issue #1)
6
- 1. (New) Add initial CLI. (Issue #4)
7
- 1. (New) Write results of each iteration to a separate file. (Issue #5)
8
- 1. (New) Add `-s` option to stop on first failure. (Issue #6)
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
@@ -1,5 +1,7 @@
1
1
  source "https://rubygems.org"
2
2
 
3
+ ruby '2.3.7'
4
+
3
5
  # Specify your gem's dependencies in rspec_n.gemspec
4
6
  gemspec
5
7
 
data/LICENSE.md CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2019 Roberts
3
+ Copyright (c) 2019 roberts1000
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
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
- ![sample](https://user-images.githubusercontent.com/2053901/52986788-d0bb7c80-33c6-11e9-9f13-0e191bdd2bb3.png)
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
- To run RSpec N times
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 N
27
+ $ rspec_n 5
24
28
 
25
- If your project has a `bin/start_rspec` file, rspec_n will invoke it to start RSpec (rspec_n assumes you have placed the necessary commands to cleanly start your test suite in that file). Otherwise, it will attempt to identify your project type and use best practices to start RSpec for your given project type. The following is a list of project types supported by rspec_n, and the commands used when that project type is selected:
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
- 1. Ruby on Rails - `DISABLE_DATABASE_ENVIRONMENT_CHECK=1 RAILS_ENV=test bundle exec rake db:drop db:create db:migrate && bundle exec rspec`.
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
- If it cannot guess a project type, rspec_n will invoke `bundle exec rspec`. You can override this by specifying a command directly on the CLI.
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
- #### Use Custom Command to Start RSpec
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
- By default, rspec_n will inspect the files in your project and pick the best way to start RSpec. You can take control by using the `-c` option which lets you specify a custom command. The following example deletes the `tmp` folder before starting RSpec:
40
+ $ rspec_n 5 --order defined
34
41
 
35
- $ rspec_n 5 -c 'rm -rf tmp && bundle exec rspec'
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
- You must wrap your entire command string in single or double quotes if it contains spaces (which it probably will). This command will be invoked each time rspec_n attempts to start RSpec.
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
- #### Control spec Order
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 provides three command line options for controlling the execution order of your specs.
57
+ $ rspec_n 5 -c 'rm -rf tmp && bundle exec rspec'
42
58
 
43
- 1. `--order rand` - Passes `--order rand` to RSpec which causes RSpec to run your specs in a random order.
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
- If you do nothing, rspec_n will use `--order rand`. This ensures the specs in your project are executed in random order for each iteration of RSpec. rspec_n doesn't supply a seed when it start RSpec using a random strategy; it lets RSpec choose the seed and reports the values in the results.
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 Ouput
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
- **Note:** rspec_n deletes all files matching `rspec_n_iteration.*` when it starts so you must move those files to another location if you want to save them.
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 when an iteration fails by using the `-s` flag. Any remaining iterations will be skipped.
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
@@ -8,7 +8,7 @@ require "rspec_n/helpers/time_helpers"
8
8
  require "rspec_n/helpers/core_ext/array"
9
9
  require "rspec_n/helpers/core_ext/string"
10
10
 
11
- require "rspec_n/errors"
11
+ require "rspec_n/errors/bad_option"
12
12
 
13
13
  require "rspec_n/constants"
14
14
  require "rspec_n/input"
@@ -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 = { "Run" => 8, "Start Time" => 22, "Finish Time" => 22, "Duration" => 13, "Seed" => 11, "Result" => 18 }
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 result_field(run)
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: #{convert_seconds_to_hms(@runner.total_duration_seconds)}"
45
- puts "Average Duration: #{convert_seconds_to_hms(@runner.avg_duration_seconds)}"
46
- puts "Total Passed: #{@runner.total_passed.to_s.colorize(:green)}"
47
- puts "Total Passed with Warnings: #{@runner.total_passed_with_warnings.to_s.colorize(:green)}"
48
- puts "Total Failed: #{@runner.total_failed.to_s.colorize(:red)}"
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 result_field(run)
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 with Warnings" then "Pass with Warnings".colorize(:yellow)
85
- when "Pass" then "Pass".colorize(:green)
86
- when "Fail" then "Fail".colorize(:red)
87
- when "Skip" then "Skip".colorize(:yellow)
88
- else "Unknown".colorize(:yellow)
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
@@ -3,4 +3,8 @@ class String
3
3
  def all_digits?
4
4
  self =~ /\A\d+\z/ ? true : false
5
5
  end
6
+
7
+ def remove_color
8
+ gsub(/\e\[(\d|;)+m/, "")
9
+ end
6
10
  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
- @order = options.fetch(:order, "rand")
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
- @args.empty? ? RspecN::DEFAULT_ITERATIONS : @args.first.to_i
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 determine_command
39
- return @options[:command] if @options.fetch(:command, nil)
40
+ def determine_spec_path
41
+ @unprocessed_args_array.empty? ? nil : @unprocessed_args_array.join(" ")
42
+ end
40
43
 
41
- guessed_command + " --order " + @order
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 :iteration, :start_time, :finish_time, :seed, :rspec_stdout, :rspec_stderr, :rspec_status, :duration_seconds, :status_string
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
- @seed = nil
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
- @status_string = nil
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 passed?
42
- @status_string == "Pass"
46
+ def has_warnings?
47
+ @has_warnings
43
48
  end
44
49
 
45
- def passed_with_warnings?
46
- @status_string == "Pass with Warnings"
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? # A seed wasn't used
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
@@ -25,19 +25,15 @@ module RspecN
25
25
  end
26
26
 
27
27
  def total_passed
28
- @runs.values.select { |run| run.passed? }.size
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 { |run| run.failed? }.size
32
+ @runs.values.select(&:failed?).size
37
33
  end
38
34
 
39
35
  def total_skipped
40
- @runs.values.select { |run| run.skipped? }.size
36
+ @runs.values.select(&:skipped?).size
41
37
  end
42
38
 
43
39
  private
@@ -1,3 +1,3 @@
1
1
  module RspecN
2
- VERSION = "1.0.0".freeze
2
+ VERSION = "1.1.0".freeze
3
3
  end
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.0.0
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-02-19 00:00:00.000000000 Z
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: '0'
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.7.8
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.
@@ -1,2 +0,0 @@
1
- require_relative "errors/bad_argument"
2
- require_relative "errors/bad_option"
@@ -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