Skip to content

Commit f035aa8

Browse files
committed
test: skip http tests failing on old rubies
1 parent 21a4b15 commit f035aa8

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

features/open_api.feature

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,7 @@ Feature: Generate Open API Specification from test examples
289289
And the output should contain "7 examples, 0 failures"
290290
And the exit status should be 0
291291

292+
@ruby27_required
292293
Scenario: Index file should look like we expect
293294
Then the file "doc/api/open_api.json" should contain JSON exactly like:
294295
"""

features/support/env.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,9 @@
99
config.match = :prefer_exact
1010
config.ignore_hidden_elements = false
1111
end
12+
13+
Before('@ruby27_required') do |scenario|
14+
if RUBY_VERSION < '2.7'
15+
skip("Skipped on Ruby #{RUBY_VERSION} (requires >= 2.7)")
16+
end
17+
end

spec/http_test_client_spec.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77

88
describe RspecApiDocumentation::HttpTestClient do
99
before(:all) do
10+
if RUBY_VERSION < '2.7'
11+
skip("Skipped on Ruby #{RUBY_VERSION} (requires >= 2.7)")
12+
end
1013
WebMock.allow_net_connect!
1114
# Capybara.server= was introduced in later versions
1215
# For older versions, we use the Capybara::Server directly with webrick

0 commit comments

Comments
 (0)