File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
features/pending_and_skipped_examples Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -110,3 +110,24 @@ Feature: `skip` examples
110
110
# No reason given
111
111
# ./skipped_spec.rb:2
112
112
"""
113
+
114
+ Scenario : Skipping using metadata with a reason
115
+ Given a file named "skipped_with_reason_spec.rb" with:
116
+ """ruby
117
+ RSpec.describe "an example" do
118
+ example "is skipped", :skip => "waiting for planets to align" do
119
+ raise "this line is never executed"
120
+ end
121
+ end
122
+ """
123
+ When I run `rspec skipped_with_reason_spec.rb`
124
+ Then the exit status should be 0
125
+ And the output should contain "1 example, 0 failures, 1 pending"
126
+ And the output should contain:
127
+ """
128
+ Pending: (Failures listed here are expected and do not affect your suite's status)
129
+
130
+ 1) an example is skipped
131
+ # waiting for planets to align
132
+ # ./skipped_with_reason_spec.rb:2
133
+ """
You can’t perform that action at this time.
0 commit comments