Skip to content

Commit

Permalink
Merge pull request #747 from nesquena/chore/update-to-rr-3
Browse files Browse the repository at this point in the history
Chore/update to rr 3
  • Loading branch information
tagliala authored Dec 7, 2021
2 parents b6b00c5 + a79154e commit 8f51fd4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion rabl.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Gem::Specification.new do |s|
end

s.add_development_dependency 'riot', '~> 0.12.3'
s.add_development_dependency 'rr', '~> 1.0.2'
s.add_development_dependency 'rr'
s.add_development_dependency 'rake'
s.add_development_dependency 'tilt'
s.add_development_dependency 'oj'
Expand Down
4 changes: 2 additions & 2 deletions test/builder_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@
b = builder nil, :glue => [{ :data => @user, :options => {}, :block => lambda { |u| attribute :name }}]
e = Rabl::Engine.new('')
mock(e).render.returns({:user => 'xyz'})
mock(b).object_to_engine(@user, { :root => false }).returns(e).subject
mock(b).object_to_engine(@user, :root => false).returns(e).subject
b.to_hash(@user)
end.equivalent_to({ :user => 'xyz' })

Expand All @@ -268,7 +268,7 @@
b = builder nil, :glue => [{ :data => @user, :options => {}, :block => lambda { |u| attribute :name }}]
e = Rabl::Engine.new('')
mock(e).render.returns({})
mock(b).object_to_engine(@user,{ :root => false }).returns(e).subject
mock(b).object_to_engine(@user, :root => false).returns(e).subject
b.to_hash(@user)
end.equals({})
end
Expand Down
2 changes: 1 addition & 1 deletion test/engine_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@

any_instance_of(Rabl::Engine) do |b|
mock(b).fetch_source("foo/bar", :view_path => nil).once
mock(b).object_to_engine(@user, :locals => { :foo => "bar" }, :source => nil, :source_location => nil, :template => 'foo/bar').returns(e)
mock(b).object_to_engine(@user, { :locals => { :foo => "bar" }, :source => nil, :source_location => nil, :template => 'foo/bar' }).returns(e)
end
JSON.parse(template.render(scope))
end.equals JSON.parse("{ \"foo\" : {\"name\":\"leo\",\"city\":\"LA\",\"age\":12} }")
Expand Down

0 comments on commit 8f51fd4

Please sign in to comment.