Sha256: 92ca19d31df03b09167535edbfdcffc93b978b87a3400a7e438de590b9ed3604

Contents?: true

Size: 528 Bytes

Versions: 3

Compression:

Stored size: 528 Bytes

Contents

require 'spec_helper'
require_relative '<%= config[:relative_view_path] %>'

describe <%= config[:app] %>::Views::<%= config[:controller] %>::<%= config[:action] %> do
  let(:exposures) { Hash[foo: 'bar'] }
  let(:template)  { Lotus::View::Template.new('<%= config[:template_path] %>') }
  let(:view)      { <%= config[:app] %>::Views::<%= config[:controller] %>::<%= config[:action] %>.new(template, exposures) }
  let(:rendered)  { view.render }

  it "exposes #foo" do
    view.foo.must_equal exposures.fetch(:foo)
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
lotusrb-0.5.0 lib/lotus/generators/action/view_spec.minitest.tt
lotusrb-0.4.1 lib/lotus/generators/action/view_spec.minitest.tt
lotusrb-0.4.0 lib/lotus/generators/action/view_spec.minitest.tt