Sha256: 7844c6aa38a5173768862044e782fb4bf1a56500a63a18bcf8196ad9e19ed09e

Contents?: true

Size: 484 Bytes

Versions: 2

Compression:

Stored size: 484 Bytes

Contents

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

  it 'exposes #foo' do
    pending 'This is an auto-generated test. Edit it and add your own tests.'

    # Example
    expect(view.foo).to eq exposures.fetch(:foo)
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
hanami-1.1.0.beta3 lib/hanami/cli/commands/generate/action/view_spec.rspec.erb
hanami-1.1.0.beta2 lib/hanami/cli/commands/generate/action/view_spec.rspec.erb