Sha256: bd97e1fea486f0c103ef5b0879e258f77c2574107c23dea0274bbc9496325b7a
Contents?: true
Size: 529 Bytes
Versions: 7
Compression:
Stored size: 529 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) { Hanami::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
7 entries across 7 versions & 1 rubygems