Skip to content

Commit 7530d80

Browse files
authored
Remove rails 5 and add rails 7 (#82)
* remove rails 5 and add rails 7 * re-work mock for rails 7 * dont test ruby 2.6 with rails 7, its not supported by rails
1 parent 4cbe59c commit 7530d80

File tree

4 files changed

+13
-7
lines changed

4 files changed

+13
-7
lines changed

.github/workflows/push.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@ jobs:
88
fail-fast: false
99
matrix:
1010
ruby: [2.6, 2.7]
11-
rails: ['5.0', '5.1', '5.2', '6.0', '6.1']
11+
rails: ['5.1', '5.2', '6.0', '6.1', '7.0']
12+
exclude:
13+
- rails: '7.0'
14+
ruby: 2.6
1215

1316
runs-on: ubuntu-latest
1417
name: Test against Ruby ${{ matrix.ruby }} / Rails ${{ matrix.rails }}

Appraisals

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
appraise "rails-7.0" do
2+
gem "rails", "~> 7.0"
3+
end
4+
15
appraise "rails-6.1" do
26
gem "rails", "~> 6.1.0"
37
end
@@ -13,7 +17,3 @@ end
1317
appraise "rails-5.1" do
1418
gem "rails", "~> 5.1.7"
1519
end
16-
17-
appraise "rails-5.0" do
18-
gem "rails", "~> 5.0.7", '>= 5.0.7.2'
19-
end

gemfiles/rails_5.0.gemfile renamed to gemfiles/rails_7.0.gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
source "https://rubygems.org"
44

5-
gem "rails", "~> 5.0.7", ">= 5.0.7.2"
5+
gem "rails", "~> 7.0"
66

77
gemspec path: "../"

spec/inertia/sharing_spec.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,10 @@
4343
let(:errors) { 'rearview mirror is present' }
4444
before {
4545
allow_any_instance_of(ActionDispatch::Request).to receive(:session) {
46-
{ inertia_errors: errors }
46+
spy(ActionDispatch::Request::Session).tap do |spy|
47+
allow(spy).to receive(:[])
48+
allow(spy).to receive(:[]).with(:inertia_errors).and_return(errors)
49+
end
4750
}
4851
get share_path, headers: {'X-Inertia' => true}
4952
}

0 commit comments

Comments
 (0)