Sha256: 749ed426466b3a02b8252cd6bacea555e1690e9f5757d1b874a8ab49fd59290a
Contents?: true
Size: 452 Bytes
Versions: 2
Compression:
Stored size: 452 Bytes
Contents
require_relative '<%= config[:relative_view_path] %>' RSpec.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) { described_class.new(template, exposures) } let(:rendered) { view.render } it 'exposes #foo' do expect(view.foo).to eq exposures.fetch(:foo) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
lotusrb-0.6.1 | lib/lotus/generators/action/view_spec.rspec.tt |
lotusrb-0.6.0 | lib/lotus/generators/action/view_spec.rspec.tt |