Sha256: b4488d677f605b16d57cb730f2e524c978a07f0d5f52af02cceb2c6182a73b5c

Contents?: true

Size: 751 Bytes

Versions: 2

Compression:

Stored size: 751 Bytes

Contents

require 'spec_helper'

describe StacheController do
  render_views

  before do
    Stache.template_base_path = ::Rails.root.join('app', 'views')
  end

  it "can get to index and render a Mustache" do
    get :index
    assert_response 200

    response.should render_template 'index'               # view
    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 the asset helpers" do
    get :with_asset_helpers
    assert_response 200

    response.body.should =~ /Here's an image_path=\/assets\/image\.png/
    response.body.should =~ /link href="\/assets\/test\.css"/
  end


end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
stache-0.9.1 spec/controllers/stache_controller_spec.rb
stache-0.9.0 spec/controllers/stache_controller_spec.rb