Sha256: 01f0d14ba6dbc721c08ada81f94ca2988e07e6b63093b25c4746bbc60b404b45

Contents?: true

Size: 432 Bytes

Versions: 9

Compression:

Stored size: 432 Bytes

Contents

require "spec_helper"

RSpec.describe <%= app.classify %>::Views::ApplicationLayout, type: :view do
  let(:layout)   { <%= app.classify %>::Views::ApplicationLayout.new(template, {}) }
  let(:rendered) { layout.render }
  let(:template) { Hanami::View::Template.new('apps/<%= app %>/templates/application.html.<%= template %>') }

  it 'contains application name' do
    expect(rendered).to include('<%= app.classify %>')
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
hanami-1.3.0.beta1 lib/hanami/cli/commands/generate/app/layout_spec.rspec.erb
hanami-1.2.0 lib/hanami/cli/commands/generate/app/layout_spec.rspec.erb
hanami-1.2.0.rc2 lib/hanami/cli/commands/generate/app/layout_spec.rspec.erb
hanami-1.2.0.rc1 lib/hanami/cli/commands/generate/app/layout_spec.rspec.erb
hanami-1.2.0.beta2 lib/hanami/cli/commands/generate/app/layout_spec.rspec.erb
hanami-1.2.0.beta1 lib/hanami/cli/commands/generate/app/layout_spec.rspec.erb
hanami-1.1.1 lib/hanami/cli/commands/generate/app/layout_spec.rspec.erb
hanami-1.1.0 lib/hanami/cli/commands/generate/app/layout_spec.rspec.erb
hanami-1.1.0.rc1 lib/hanami/cli/commands/generate/app/layout_spec.rspec.erb