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 it renders the gap.rcss file, but my spec,
it "should render the gap.rcss template" do
do_get
response.should render_template("gap.rcss")
end
fails with this error:
Expected "gap.rcss", got "/Users/ashleymoran/Documents/Development/
YourMoney/trunk/src/config/../app/views/stylesheets/gap.rcss"
I don't remember this failing in 1.0.5, but it's been a while since I
worked on this project so might be just be my bad memory. Am I doing
something wrong or can you not spec "render :file" with render_template?
Thanks
Ashley
_______________________________________________
rspec-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users