Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,15 @@ jobs:
strategy:
matrix:
ruby:
- '3.1'
- '3.2'
- '3.3'
- '3.4'
name: RSpec tests ruby ${{ matrix.ruby }}
- '4.0'
rspec:
- '3'
- '4'
env:
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/rspec${{ matrix.rspec }}.gemfile
name: RSpec ${{ matrix.rspec }} tests ruby ${{ matrix.ruby }}
steps:
- name: Check out code
uses: actions/checkout@v6.1.0
Expand All @@ -37,6 +41,14 @@ jobs:
run: bundle exec rspec spec/rspec
e2e:
runs-on: ubuntu-latest
strategy:
matrix:
rspec:
- '3'
- '4'
env:
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/rspec${{ matrix.rspec }}.gemfile
name: e2e RSpec ${{ matrix.rspec }}
steps:
- name: Check out code
uses: actions/checkout@v6.1.0
Expand Down
1 change: 0 additions & 1 deletion .rspec
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
--color
--require spec_helper
--format documentation
--format RSpec::Github::Formatter
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
AllCops:
TargetRubyVersion: 3.1
TargetRubyVersion: 3.3
NewCops: enable

# A top class comment is not needed for this simple gem
Expand Down
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ PATH
remote: .
specs:
rspec-github (1.0.0.develop)
rspec-core (~> 3.0)
rspec-core (>= 3.0, < 5)

GEM
remote: https://rubygems.org/
Expand Down
9 changes: 9 additions & 0 deletions gemfiles/rspec3.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# frozen_string_literal: true

source 'https://rubygems.org'

gemspec path: '../'

group :development do
gem 'rspec', '~> 3.13'
end
33 changes: 33 additions & 0 deletions gemfiles/rspec3.gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
PATH
remote: ..
specs:
rspec-github (1.0.0.develop)
rspec-core (>= 3.0, < 5)

GEM
remote: https://rubygems.org/
specs:
diff-lcs (1.6.2)
rspec (3.13.2)
rspec-core (~> 3.13.0)
rspec-expectations (~> 3.13.0)
rspec-mocks (~> 3.13.0)
rspec-core (3.13.7)
rspec-support (~> 3.13.0)
rspec-expectations (3.13.6)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-mocks (3.13.9)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-support (3.13.8)

PLATFORMS
ruby

DEPENDENCIES
rspec (~> 3.13)
rspec-github!

BUNDLED WITH
2.6.0
9 changes: 9 additions & 0 deletions gemfiles/rspec4.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# frozen_string_literal: true

source 'https://rubygems.org'

gemspec path: '../'

group :development do
gem 'rspec', '~> 4.0.0.beta1'
end
33 changes: 33 additions & 0 deletions gemfiles/rspec4.gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
PATH
remote: ..
specs:
rspec-github (1.0.0.develop)
rspec-core (>= 3.0, < 5)

GEM
remote: https://rubygems.org/
specs:
diff-lcs (2.0.0)
rspec (4.0.0.beta1)
rspec-core (= 4.0.0.beta1)
rspec-expectations (= 4.0.0.beta1)
rspec-mocks (= 4.0.0.beta1)
rspec-core (4.0.0.beta1)
rspec-support (= 4.0.0.beta1)
rspec-expectations (4.0.0.beta1)
diff-lcs (>= 1.6.0, < 3.0)
rspec-support (= 4.0.0.beta1)
rspec-mocks (4.0.0.beta1)
diff-lcs (>= 1.6.0, < 3.0)
rspec-support (= 4.0.0.beta1)
rspec-support (4.0.0.beta1)

PLATFORMS
ruby

DEPENDENCIES
rspec (~> 4.0.0.beta1)
rspec-github!

BUNDLED WITH
2.6.0
4 changes: 2 additions & 2 deletions rspec-github.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Gem::Specification.new do |spec|
spec.description = 'Formatter for RSpec to show errors in GitHub action annotations'
spec.homepage = 'https://drieam.github.io/rspec-github'
spec.license = 'MIT'
spec.required_ruby_version = Gem::Requirement.new('>= 3.1')
spec.required_ruby_version = Gem::Requirement.new('>= 3.3')

spec.metadata['allowed_push_host'] = 'https://rubygems.org'
spec.metadata['homepage_uri'] = spec.homepage
Expand All @@ -21,5 +21,5 @@ Gem::Specification.new do |spec|
# Specify which files should be added to the gem when it is released.
spec.files = Dir['{lib}/**/*']

spec.add_dependency 'rspec-core', '~> 3.0'
spec.add_dependency 'rspec-core', '>= 3.0', '< 5'
end
12 changes: 8 additions & 4 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,14 @@
# Enable flags like --only-failures and --next-failure
config.example_status_persistence_file_path = '.rspec_status'

# Disable RSpec exposing methods globally on `Module` and `main`
config.disable_monkey_patching!
# RSpec 4 no longer exposes its DSL globally and dropped the `should` syntax,
# so these settings only exist (and are only needed) on RSpec 3.
if config.respond_to?(:disable_monkey_patching!)
# Disable RSpec exposing methods globally on `Module` and `main`
config.disable_monkey_patching!

config.expect_with :rspec do |c|
c.syntax = :expect
config.expect_with :rspec do |c|
c.syntax = :expect
end
end
end
Loading