Sha256: 0eeebf81aed9b743154dc34dc3314ed3f045b344b9c5d6a391dac624d54a3168
Contents?: true
Size: 880 Bytes
Versions: 2
Compression:
Stored size: 880 Bytes
Contents
require 'spec_helper' describe HandlebarsController do render_views before do Stache.template_base_path = ::Rails.root.join('app', 'views') end it "can get to index and render a Handlebars" do get :index assert_response 200 response.should render_template 'index' response.body.should =~ /Hello, Matt!/ end it "correctly renders partials" do get :with_partials assert_response 200 response.body.should =~ /Grue/ # puts response.body end it "correctly uses helpers" do get :with_helpers assert_response 200 response.body.should =~ /Here's an image_path=\/assets\/image\.png/ response.body.should =~ /Here's a capitalized string: Lowercase/ end it "doesn't blow up if it is missing data" do get :with_missing_data assert_response 200 response.body.should =~ /I should not \./ end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
stache-1.0.0.rc | spec/controllers/handlebars_controller_spec.rb |
stache-0.9.1 | spec/controllers/handlebars_controller_spec.rb |