Sha256: f2141ff16473a7da9d31b323e6b64f3a3b77671a74b8c53c5abd1d69e6a2c115

Contents?: true

Size: 508 Bytes

Versions: 2

Compression:

Stored size: 508 Bytes

Contents

require_relative '../../../spec_helper'

describe <%= app.classify %>::Views::<%= classified_controller_name %>::<%= action.classify %> do
  let(:exposures) { Hash[format: :html] }
  let(:template)  { Hanami::View::Template.new('<%= template %>') }
  let(:view)      { <%= app.classify %>::Views::<%= classified_controller_name %>::<%= action.classify %>.new(template, exposures) }
  let(:rendered)  { view.render }

  it 'exposes #format' do
    _(view.format).must_equal exposures.fetch(:format)
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
hanami-1.3.5 lib/hanami/cli/commands/generate/action/view_spec.minitest.erb
hanami-1.3.4 lib/hanami/cli/commands/generate/action/view_spec.minitest.erb