Sha256: 45bd15ea68ef633388f1129ebacee1a00e853e1e814aac58147b891f088e0018

Contents?: true

Size: 497 Bytes

Versions: 2

Compression:

Stored size: 497 Bytes

Contents

RSpec.describe <%= app.classify %>::Views::<%= classified_controller_name %>::<%= action.classify %>, type: :view 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 lib/hanami/cli/commands/generate/action/view_spec.rspec.erb
hanami-1.1.0.rc1 lib/hanami/cli/commands/generate/action/view_spec.rspec.erb