Displaying 3 results from an estimated 3 matches for "rendered_file".
2007 Jun 12
3
rspec 1.0.x and liquid?
...trunk/vendor/plugins/rspec_on_rails/lib/spec/rails/matchers/render_template.rb:12:in
`matches?''
spec/controllers/buyer_controller_spec.rb:57:
spec/controllers/buyer_controller_spec.rb:63:
should render_template is looking for
11: def matches?(response)
12: @actual = response.rendered_file(!expected.include?(''/''))
13: actual == expected
14: end
TestResponse.rendered_file looks like
208: def rendered_file(with_controller=false)
209: unless template.first_render.nil?
210: unless with_controller
211: template.first_render
so Tes...
2007 Apr 20
1
getting controller specs to work on edge
...ranslator, the "it" section was:
it "should render index.rhtml" do
controller.should render_template(''index'')
do_get
end
But that gave me
NoMethodError in ''Requesting /users using GET should render index.rhtml''
undefined method `rendered_file'' for #<UsersController:0x31d93b0>
.../vendor/plugins/rspec_on_rails/lib/spec/rails/matchers/render_template.rb:12:in
`matches?''
Can anyone see what I''m doing wrong??
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.or...
2007 Aug 21
1
Render template not matching absolute path
Hi
I have a simple controller method like this:
class StylesheetsController < ApplicationController
layout nil
session :off
def gap
site = Site.find_by_hostname(request.host)
@colours = site.colours
respond_to do |accepts|
accepts.css { render :file => "#{RAILS_ROOT}/app/views/
stylesheets/gap.rcss" }
end
end
end
And I want to test that