Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle rspec-mocks 3.10.3 change with "with" syntax #1433

Merged
merged 1 commit into from
Jun 1, 2022
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
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
source 'https://rubygems.org'

group :development do
gem 'rspec'
gem 'rspec', '>= 3.11.0'
gem 'rake'
gem 'rdoc'
gem 'json'
Expand Down
2 changes: 1 addition & 1 deletion spec/code_objects/base_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ class X; end
describe "#format" do
it "sends object to Templates.render" do
object = MethodObject.new(:root, :method)
expect(Templates::Engine).to receive(:render).with(:x => 1, :object => object, :type => object.type)
expect(Templates::Engine).to receive(:render).with({:x => 1, :object => object, :type => object.type})
object.format :x => 1
end

Expand Down
2 changes: 1 addition & 1 deletion spec/templates/helpers/base_helper_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@

it "passes off to #link_url if argument is recognized as a URL" do
url = "http://yardoc.org/"
expect(self).to receive(:link_url).with(url, nil, :target => '_parent')
expect(self).to receive(:link_url).with(url, nil, {:target => '_parent'})
linkify url
end

Expand Down
2 changes: 1 addition & 1 deletion spec/templates/template_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ def init; sections 1, 2, 3 end
it "renders all sections with options" do
mod = template(:e).new
allow(mod).to receive(:render_section) {|section| section.name.to_s }
expect(mod).to receive(:add_options).with(:a => 1).and_yield
expect(mod).to receive(:add_options).with({:a => 1}).and_yield
mod.sections :a
expect(mod.run(:a => 1)).to eq 'a'
end
Expand Down