Skip to content

Commit a2b62ce

Browse files
authoredJan 10, 2024
Support for Rails 7.1 and Ruby 3.3 (#98)
* rails 7.1 and ruby 3.3 * Update tests, README and History file * set 3.3.0 as default
1 parent 5453a6a commit a2b62ce

File tree

8 files changed

+24
-25
lines changed

8 files changed

+24
-25
lines changed
 

‎.github/workflows/build.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ jobs:
1515
strategy:
1616
fail-fast: false
1717
matrix:
18-
rails: ["7.0", "6.1", "6.0"]
19-
ruby: ["3.2.2", "3.1.4", "3.0.6", "2.7.8"]
18+
rails: ["7.1", "7.0", "6.1", "6.0"]
19+
ruby: ["3.3", "3.2.2", "3.1.4", "3.0.6", "2.7.8"]
2020
cucumber: ["9.0", "8.0", "7.0", "6.0", "5.0", "4.0", "3.0"]
2121

2222
env:

‎Gemfile

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ git_source(:github){ |repo_name| "https://github.com/#{repo_name}.git" }
55
gemspec :path => "."
66

77
# use ENV vars, with default value as fallback for local setup
8-
ruby (ENV['RUBY_VERSION'] || '3.2.2')
9-
gem "rails", "~> #{ENV['RAILS_VERSION'] || '7.0'}.0"
10-
gem "cucumber", "~> #{ENV['CUKES_VERSION'] || '7.0'}"
8+
ruby (ENV['RUBY_VERSION'] || '3.3.0')
9+
gem "rails", "~> #{ENV['RAILS_VERSION'] || '7.1'}.0"
10+
gem "cucumber", "~> #{ENV['CUKES_VERSION'] || '9.0'}"
1111
gem "cucumber-rails"
1212
gem 'fabrication', github: 'mathieujobin/fabrication', ref: '923cf6fcefd0566b1d6be7bd2f685b89388f4800'
1313
gem 'sprockets-rails'

‎History.txt

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
== 0.9.1
2+
* Added support for Rails 7.1
3+
14
== 0.9.0
25
* Added support for Cucumber 9.x
36

‎README.md

+2-7
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,8 @@ This is a quickstart guide for rails apps. Firstly, install [cucumber-rails](ht
1414
## Supported versions
1515

1616
Cucumber 2.x - support was dropped from release 0.6.0
17-
Cucumber 3.x - support is best-effort basis, but tests run on rails 4.2 all the way until 6.1
18-
Cucumber 4.x - should work with all Rails 5.x versions, tests only run for 5.2 and 6.0
19-
Cucumber 5.x - all tests pass for rails 5.2, 6.0 and 6.1
20-
Cucumber 6.x - all tests pass for rails 6.0, 6.1 and 7.0
21-
Cucumber 7.x - all tests pass for rails 6.0, 6.1 and 7.0
22-
Cucumber 8.x - all tests pass for rails 6.0, 6.1 and 7.0
23-
Cucumber 9.x - all tests pass for rails 6.0, 6.1 and 7.0
17+
Rails 4.x and 5.x - Support for Cucumber 3.x -> 7.x; Dropped in 0.8.0
18+
Rails 6.x and 7.x - Support for Cucumber 3.x -> 9.x
2419

2520
Please open pull-requests with fixes if you encounter any problems.
2621
No active development on this gem.

‎lib/pickle/version.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module Pickle
2-
VERSION = "0.9.0"
2+
VERSION = "0.9.1"
33
end

‎pickle.gemspec

+2-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ Gem::Specification.new do |s|
2626
s.add_development_dependency "bundler"
2727
s.add_development_dependency "git"
2828
s.add_development_dependency "yard"
29-
s.add_development_dependency "rspec-rails", "~>3.0"
29+
s.add_development_dependency "rspec-rails", ">= 3.0"
30+
s.add_development_dependency "rspec-mocks", ">= 3.12.4"
3031
s.add_development_dependency "rails", ">= 6.0", "< 8.0"
3132
s.add_development_dependency "cucumber-rails"
3233
s.add_development_dependency "factory_bot"

‎spec/pickle/session_spec.rb

+8-8
Original file line numberDiff line numberDiff line change
@@ -230,14 +230,14 @@ class Model
230230
end
231231

232232
it "#create_models_from_table(<plural factory>, <table>) should call create_model for each of the table hashes with plain factory name and return the models" do
233-
expect(self).to receive(:create_model).with("user", 'name' => "Fred").once.ordered.and_return(:fred)
234-
expect(self).to receive(:create_model).with("user", 'name' => "Betty").once.ordered.and_return(:betty)
233+
expect(self).to receive(:create_model).with("user", {"name" => "Fred"}).once.ordered.and_return(:fred)
234+
expect(self).to receive(:create_model).with("user", {"name" => "Betty"}).once.ordered.and_return(:betty)
235235
expect(create_models_from_table("users", table)).to eq([:fred, :betty])
236236
end
237237

238238
it "#find_models_from_table(<plural factory>, <table>) should call find_model for each of the table hashes with plain factory name and return the models" do
239-
expect(self).to receive(:find_model).with("user", 'name' => "Fred").once.ordered.and_return(:fred)
240-
expect(self).to receive(:find_model).with("user", 'name' => "Betty").once.ordered.and_return(:betty)
239+
expect(self).to receive(:find_model).with("user", {"name" => "Fred"}).once.ordered.and_return(:fred)
240+
expect(self).to receive(:find_model).with("user", {"name" => "Betty"}).once.ordered.and_return(:betty)
241241
expect(find_models_from_table("users", table)).to eq([:fred, :betty])
242242
end
243243
end
@@ -248,14 +248,14 @@ class Model
248248
end
249249

250250
it "#create_models_from_table(<plural factory>, <table>) should call create_model for each of the table hashes with labelled pickle ref" do
251-
expect(self).to receive(:create_model).with("user \"fred\"", 'name' => "Fred").once.ordered.and_return(:fred)
252-
expect(self).to receive(:create_model).with("user \"betty\"", 'name' => "Betty").once.ordered.and_return(:betty)
251+
expect(self).to receive(:create_model).with("user \"fred\"", {"name" => "Fred"}).once.ordered.and_return(:fred)
252+
expect(self).to receive(:create_model).with("user \"betty\"", {"name" => "Betty"}).once.ordered.and_return(:betty)
253253
expect(create_models_from_table("users", table)).to eq([:fred, :betty])
254254
end
255255

256256
it "#find_models_from_table(<plural factory>, <table>) should call find_model for each of the table hashes with labelled pickle ref" do
257-
expect(self).to receive(:find_model).with("user \"fred\"", 'name' => "Fred").once.ordered.and_return(:fred)
258-
expect(self).to receive(:find_model).with("user \"betty\"", 'name' => "Betty").once.ordered.and_return(:betty)
257+
expect(self).to receive(:find_model).with("user \"fred\"", {"name" => "Fred"}).once.ordered.and_return(:fred)
258+
expect(self).to receive(:find_model).with("user \"betty\"", {"name" => "Betty"}).once.ordered.and_return(:betty)
259259
expect(find_models_from_table("users", table)).to eq([:fred, :betty])
260260
end
261261
end

‎spec/pickle_spec.rb

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
it ".config should be same object on multiple calls" do
55
expect(Pickle.config).to eq(Pickle.config)
66
end
7-
7+
88
it ".configure should configure the .config object" do
99
expect(Pickle.config).to receive(:foo).with(:bar)
1010
Pickle.configure do |c|
@@ -14,10 +14,10 @@
1414

1515
it ".parser should create a parser with the default config" do
1616
Pickle.instance_variable_set('@parser', nil)
17-
expect(Pickle::Parser).to receive(:new).with(:config => Pickle.config)
17+
expect(Pickle::Parser).to receive(:new).with({:config => Pickle.config})
1818
Pickle.parser
1919
end
20-
20+
2121
it ".parser should be same object on multiple calls" do
2222
expect(Pickle.parser).to eq(Pickle.parser)
2323
end

0 commit comments

Comments
 (0)
Please sign in to comment.