I upgraded a small project that I had created on 3.1.3 to 3.2.0.rc2.
Running rspec on it brings about a large amount of these messages:
DEPRECATION WARNING: Passing a template handler in the template name is deprecated. You can simply remove the handler name or pass render :handlers => [:haml] instead. (called from block (2 levels) in <top (required)> at /home/peterv/data/backed_up/projects/code/contact_app/spec/views/contacts/new.html.haml_spec.rb:12) .
The offending code seems to be:
spec/views/contacts$ cat -n new.html.haml_spec.rb
1 require ‘spec_helper’
2
3 describe “contacts/new.html.haml” do
4 before(:each) do
5 assign(:contact, stub_model(Contact,
6 :email => “MyString”,
7 :person_id => 1
8 ).as_new_record)
9 end
10
11 it “renders new contact form” do
12 render ####### this render seems to trigger it
13
14 # Run the generator again with the --webrat flag if you want to use webrat matchers
15 assert_select “form”, :action => contacts_path, :method => “post” do
16 assert_select “input#contact_email”, :name => “contact[email]”
17 assert_select “input#contact_person_id”, :name => “contact[person_id]”
18 end
19 end
20 end
These are the view files (with .haml extensions)
app/views/contacts$ ls -l total 20 -rw-rw-r-- 1 peterv peterv 100 2012-01-15 20:12 edit.html.haml -rw-rw-r-- 1 peterv peterv 416 2012-01-15 20:12 _form.html.haml -rw-rw-r-- 1 peterv peterv 404 2012-01-15 20:12 index.html.haml -rw-rw-r-- 1 peterv peterv 66 2012-01-15 20:12 new.html.haml -rw-rw-r-- 1 peterv peterv 171 2012-01-15 20:12 show.html.haml
app/views/contacts$ cat -n new.html.haml
1 %h1 New contact
2
3 = render ‘form’
4
5 = link_to ‘Back’, contacts_path
I just did a bundle update a few hours ago. I show the Gemfile and Gemfile.lock below.
I presume this is associated with this commit
https://github.com/rails/rails/commit/43d27e9105b385f64ec195f60d10ab3d64281bd4
Is there a way I can fix this myself? I do not really understand what the problem and the proposed solution is …
Thanks,
Peter