rory 0.3.9 → 0.3.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -16,7 +16,7 @@ module Rory
16
16
  end
17
17
 
18
18
  def render(template_name, opts = {})
19
- opts = { :layout => false, :app => @app }.merge(opts)
19
+ opts = { :layout => false, :app => @app, :base_url => @base_url }.merge(opts)
20
20
  renderer = Rory::Renderer.new(template_name, opts)
21
21
  renderer.render
22
22
  end
data/lib/rory/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Rory
2
- VERSION = '0.3.9'
2
+ VERSION = '0.3.10'
3
3
  end
@@ -0,0 +1,33 @@
1
+ describe Rory::Renderer::Context do
2
+ describe "#render" do
3
+ it "returns sub-renderer output" do
4
+ renderer_context = Rory::Renderer::Context.new({
5
+ :app => :an_app,
6
+ :base_url => 'yoyo'
7
+ })
8
+ passed_renderer_options = {
9
+ :layout => false, :app => :an_app, :base_url => 'yoyo'
10
+ }
11
+ allow(Rory::Renderer).to receive(:new).
12
+ with('not/real', passed_renderer_options).
13
+ and_return(double('Renderer', :render => 'Here ya go'))
14
+ renderer_context.render('not/real').should == 'Here ya go'
15
+ end
16
+
17
+ it "does not pass locals or layout to sub-renderer" do
18
+ renderer_context = Rory::Renderer::Context.new({
19
+ :locals => { :thing => :great },
20
+ :app => :an_app,
21
+ :base_url => 'yoyo',
22
+ :layout => 'groooovy'
23
+ })
24
+ passed_renderer_options = {
25
+ :layout => false, :app => :an_app, :base_url => 'yoyo'
26
+ }
27
+ allow(Rory::Renderer).to receive(:new).
28
+ with('also/fake', passed_renderer_options).
29
+ and_return(double('Renderer', :render => 'Scamazing!'))
30
+ renderer_context.render('also/fake').should == 'Scamazing!'
31
+ end
32
+ end
33
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rory
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.9
4
+ version: 0.3.10
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -219,6 +219,7 @@ files:
219
219
  - spec/lib/rory/application_spec.rb
220
220
  - spec/lib/rory/controller_spec.rb
221
221
  - spec/lib/rory/dispatcher_spec.rb
222
+ - spec/lib/rory/renderer/context_spec.rb
222
223
  - spec/lib/rory/renderer_spec.rb
223
224
  - spec/lib/rory/support_spec.rb
224
225
  - spec/lib/rory_spec.rb