Displaying 4 results from an estimated 4 matches for "haml_spec".
2012 Jan 15
2
DEPRECATION WARNING: Passing a template handler in the template name is deprecated. (rspec + haml)
...ARNING: 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...
2007 Nov 20
3
How to test views with Nested Resources and Partials
...sue. I''m
pretty sure template.expect_render/template.stub_render should be in
there somewhere, but that just generates more errors.
I am running edge rails and edge rspec. My other spec''s are working
fine.
See the output from running the spec and the associated files below
(edit.haml_spec.rb, edit.haml, _form.haml)
Thanks for your help,
Troy
######## Output from running edit.haml_spec.r ########
F
1)
ActionView::TemplateError in ''/line_items/edit.haml should render edit
form''
contract_line_item_url failed to generate from
{:contract_id=>"1"...
2011 Oct 08
1
Rails view spec expectations/matchers
...er/cleaner way?
Here goes...
*spec/spec_helper.rb*
RSpec.configure do |config|
config.include RSpec::ViewHelper, :type => :view
end
*spec/support/view_helper.rb*
module RSpec::ViewHelper
def page
@page ||= Capybara::Node::Simple.new(rendered)
end
end
*spec/views/comments/index.html.haml_spec.rb*
require "spec_helper"
describe "comments/index.html.haml" do
it "should show a proper breadcrumb" do
# Assign instance vars
# Mock helper methods
render
page.should have_selector("div.breadcrumb")
page.find("div.breadcrumb&q...
2007 Dec 12
0
Alternate file jump in Textmate
...the
bundle, all working good.
Got a problem with the Alternate File jump (Ctl Shift DownArrow)
because it works fine in Rails with the html.erb templates, but I can
not figure out how to get it working with HAML templates that I am
using.
For ref, my specs are called:
spec/views/users/edit.html.haml_spec.rb
For the corresponding view:
app/views/users/edit.html.haml
When I try the jump it wants to create:
app/views/users/edit.html.haml.rb
Any pointers on how to fix this? Looking inside the bundle sort of
left me dry and stranded...
Mikel