Sha256: cbe55faf10143a3e6ad7388ba7d4dd154af00feeba229509abc45c47364de347

Contents?: true

Size: 435 Bytes

Versions: 6

Compression:

Stored size: 435 Bytes

Contents

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

6 entries across 6 versions & 1 rubygems

Version Path
locomotivecms_common-0.4.0 spec/unit/attr_extras_ext_spec.rb
locomotivecms_common-0.3.1 spec/unit/attr_extras_ext_spec.rb
locomotivecms_common-0.3.0 spec/unit/attr_extras_ext_spec.rb
locomotivecms_common-0.2.0 spec/unit/attr_extras_ext_spec.rb
locomotivecms_common-0.1.0 spec/unit/attr_extras_ext_spec.rb
locomotivecms_common-0.0.5 spec/unit/attr_extras_ext_spec.rb