Skip to content

Commit

Permalink
Merge pull request #1433 from mtasaka/rspec3_11-fix
Browse files Browse the repository at this point in the history
Handle rspec-mocks 3.10.3 change with "with" syntax
  • Loading branch information
lsegal authored Jun 1, 2022
2 parents 7101463 + e63ecb9 commit e1e378c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
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

0 comments on commit e1e378c

Please sign in to comment.