Sha256: 6234b544dfd514cf91712ff45ccbd371d2447f96cdbe67f535f170b3048ac08d
Contents?: true
Size: 531 Bytes
Versions: 2
Compression:
Stored size: 531 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 expect(view.foo).to eq exposures.fetch(:foo) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
lotusrb-0.4.1 | lib/lotus/generators/action/view_spec.rspec.tt |
lotusrb-0.4.0 | lib/lotus/generators/action/view_spec.rspec.tt |