Sha256: f4755826496a6c29e3e3a270f5942f4327a07d97b3fbcef7a387bac62d097077

Contents?: true

Size: 416 Bytes

Versions: 13

Compression:

Stored size: 416 Bytes

Contents

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

  it 'exposes #format' do
    expect(view.format).to eq exposures.fetch(:format)
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
hanami-1.3.5 lib/hanami/cli/commands/generate/action/view_spec.rspec.erb
hanami-1.3.4 lib/hanami/cli/commands/generate/action/view_spec.rspec.erb
hanami-1.3.3 lib/hanami/cli/commands/generate/action/view_spec.rspec.erb
hanami-1.3.2 lib/hanami/cli/commands/generate/action/view_spec.rspec.erb
hanami-1.3.1 lib/hanami/cli/commands/generate/action/view_spec.rspec.erb
hanami-1.3.0 lib/hanami/cli/commands/generate/action/view_spec.rspec.erb
hanami-1.3.0.beta1 lib/hanami/cli/commands/generate/action/view_spec.rspec.erb
hanami-1.2.0 lib/hanami/cli/commands/generate/action/view_spec.rspec.erb
hanami-1.2.0.rc2 lib/hanami/cli/commands/generate/action/view_spec.rspec.erb
hanami-1.2.0.rc1 lib/hanami/cli/commands/generate/action/view_spec.rspec.erb
hanami-1.2.0.beta2 lib/hanami/cli/commands/generate/action/view_spec.rspec.erb
hanami-1.2.0.beta1 lib/hanami/cli/commands/generate/action/view_spec.rspec.erb
hanami-1.1.1 lib/hanami/cli/commands/generate/action/view_spec.rspec.erb