File tree Expand file tree Collapse file tree 2 files changed +22
-0
lines changed
Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change 148148 subject
149149 end
150150 end
151+
152+ context "with error outside examples" do
153+ let ( :exit_code ) { 2 }
154+
155+ before do
156+ summary = '0 examples, 0 failures, 1 error occurred outside of examples'
157+ allow ( results ) . to receive ( :summary ) . and_return ( summary )
158+ end
159+
160+ it { is_expected . to_not be_all_green }
161+
162+ it { is_expected . to be_error_and_examples_not_run }
163+ end
151164 end
152165end
Original file line number Diff line number Diff line change 340340 runner . run ( paths )
341341 end
342342
343+ it "notifies that examples are not run" do
344+ allow ( process ) . to receive ( :error_and_examples_not_run? ) . and_return ( true )
345+
346+ expect ( notifier ) . to receive ( :notify_failure )
347+ . with ( /Error\/ s occurred and examples are not run./ )
348+
349+ runner . run ( paths )
350+ end
351+
343352 describe "return value" do
344353 subject { runner . run ( paths ) }
345354
You can’t perform that action at this time.
0 commit comments