Skip to content

Commit

Permalink
Update tests, README and History file
Browse files Browse the repository at this point in the history
  • Loading branch information
mathieujobin committed Nov 17, 2023
1 parent fa59161 commit 2ab4a09
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 19 deletions.
3 changes: 3 additions & 0 deletions History.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
== 0.9.1
* Added support for Rails 7.1

== 0.9.0
* Added support for Cucumber 9.x

Expand Down
9 changes: 2 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,8 @@ This is a quickstart guide for rails apps. Firstly, install [cucumber-rails](ht
## Supported versions

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

Please open pull-requests with fixes if you encounter any problems.
No active development on this gem.
Expand Down
2 changes: 1 addition & 1 deletion lib/pickle/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Pickle
VERSION = "0.9.0"
VERSION = "0.9.1"
end
16 changes: 8 additions & 8 deletions spec/pickle/session_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -230,14 +230,14 @@ class Model
end

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
expect(self).to receive(:create_model).with("user", 'name' => "Fred").once.ordered.and_return(:fred)
expect(self).to receive(:create_model).with("user", 'name' => "Betty").once.ordered.and_return(:betty)
expect(self).to receive(:create_model).with("user", {"name" => "Fred"}).once.ordered.and_return(:fred)
expect(self).to receive(:create_model).with("user", {"name" => "Betty"}).once.ordered.and_return(:betty)
expect(create_models_from_table("users", table)).to eq([:fred, :betty])
end

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
expect(self).to receive(:find_model).with("user", 'name' => "Fred").once.ordered.and_return(:fred)
expect(self).to receive(:find_model).with("user", 'name' => "Betty").once.ordered.and_return(:betty)
expect(self).to receive(:find_model).with("user", {"name" => "Fred"}).once.ordered.and_return(:fred)
expect(self).to receive(:find_model).with("user", {"name" => "Betty"}).once.ordered.and_return(:betty)
expect(find_models_from_table("users", table)).to eq([:fred, :betty])
end
end
Expand All @@ -248,14 +248,14 @@ class Model
end

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

it "#find_models_from_table(<plural factory>, <table>) should call find_model for each of the table hashes with labelled pickle ref" do
expect(self).to receive(:find_model).with("user \"fred\"", 'name' => "Fred").once.ordered.and_return(:fred)
expect(self).to receive(:find_model).with("user \"betty\"", 'name' => "Betty").once.ordered.and_return(:betty)
expect(self).to receive(:find_model).with("user \"fred\"", {"name" => "Fred"}).once.ordered.and_return(:fred)
expect(self).to receive(:find_model).with("user \"betty\"", {"name" => "Betty"}).once.ordered.and_return(:betty)
expect(find_models_from_table("users", table)).to eq([:fred, :betty])
end
end
Expand Down
6 changes: 3 additions & 3 deletions spec/pickle_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
it ".config should be same object on multiple calls" do
expect(Pickle.config).to eq(Pickle.config)
end

it ".configure should configure the .config object" do
expect(Pickle.config).to receive(:foo).with(:bar)
Pickle.configure do |c|
Expand All @@ -14,10 +14,10 @@

it ".parser should create a parser with the default config" do
Pickle.instance_variable_set('@parser', nil)
expect(Pickle::Parser).to receive(:new).with(:config => Pickle.config)
expect(Pickle::Parser).to receive(:new).with({:config => Pickle.config})
Pickle.parser
end

it ".parser should be same object on multiple calls" do
expect(Pickle.parser).to eq(Pickle.parser)
end
Expand Down

0 comments on commit 2ab4a09

Please sign in to comment.