Skip to content

Commit ce23d08

Browse files
headiuseregon
authored andcommitted
Add repeat option to ci command
The repeat option was only supported by the run command, but for convenience this adds it to the ci command. Specs are also added to ensure the option is available for both commands. Fixes #74
1 parent 484310d commit ce23d08

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

lib/mspec/commands/mspec-ci.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ def options(argv = ARGV)
1818
options.chdir
1919
options.prefix
2020
options.configure { |f| load f }
21+
options.repeat
2122
options.pretend
2223
options.interrupt
2324
options.timeout

spec/commands/mspec_ci_spec.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,11 @@
7878
@script.options []
7979
end
8080

81+
it "enables the repeat option" do
82+
expect(@options).to receive(:repeat)
83+
@script.options @argv
84+
end
85+
8186
it "calls #custom_options" do
8287
expect(@script).to receive(:custom_options).with(@options)
8388
@script.options []

spec/commands/mspec_run_spec.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,11 @@
105105
@script.options @argv
106106
end
107107

108+
it "enables the repeat option" do
109+
expect(@options).to receive(:repeat)
110+
@script.options @argv
111+
end
112+
108113
it "exits if there are no files to process and './spec' is not a directory" do
109114
expect(File).to receive(:directory?).with("./spec").and_return(false)
110115
expect(@options).to receive(:parse).and_return([])

0 commit comments

Comments
 (0)