Sha256: ba05f45bf5f9053d0d86b2c3f206759dda333affa87986ec14ec32ad8bf614df

Contents?: true

Size: 460 Bytes

Versions: 2

Compression:

Stored size: 460 Bytes

Contents

# frozen_string_literal: true

require 'spec_helper'

describe AttrExtrasExt do
  subject { Person.new('Hank', 'Moody') }

  describe 'reader' do
    it { expect(subject.first_name).to eq 'Hank' }
    it { expect(subject.last_name).to eq 'Moody' }
  end

  describe 'writer' do
    before { subject.first_name = 'Karen' }

    it { expect(subject.first_name).to eq 'Karen' }
  end

  class Person
    attr_accessor_initialize :first_name, :last_name
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
locomotivecms_common-0.6.0.alpha1 spec/unit/attr_extras_ext_spec.rb
locomotivecms_common-0.5.0 spec/unit/attr_extras_ext_spec.rb