Sha256: 58d066ef6db1c05f2cd2a2a04bd1fd2f0dabffd01067b76bc4efad38a97db517

Contents?: true

Size: 504 Bytes

Versions: 4

Compression:

Stored size: 504 Bytes

Contents

require 'rails_helper'
#
describe <%= options[:name].camelize %>Presenter do
  include_behavior

  let(:presenter) {<%= options[:name].camelize %>Presenter.new(<%= options[:name] %>, view)}
  let(:<%= options[:name] %>) {create :<%= options[:name] %>}

  it 'returns name' do
    expect(presenter.name).to eq object.attribute + " " + object.attribute
  end

  it 'returns edit path' do
    expect(presenter.edit_link).to eq link_to :Edit, edit_<%= options[:name] %>_path(<%= options[:name] %>)
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
myrails-6.0.0 lib/myrails/templates/rails/app/presenters/presenter_spec.rb
myrails-5.0.0 lib/myrails/templates/rails/app/presenters/presenter_spec.rb
myrails-4.0.0 lib/myrails/templates/presenters/presenter_spec.rb
myrails-3.2.1 lib/myrails/templates/presenters/presenter_spec.rb