Sha256: 306bf600ccd7617cb032f8ad01d18756b806114c1eeaeeab52b9288b05f07ae8
Contents?: true
Size: 590 Bytes
Versions: 7
Compression:
Stored size: 590 Bytes
Contents
# frozen_string_literal: true require 'spec_helper' describe Azeroth::Decorator::MethodBuilder do let(:decorator_class) { Class.new(Azeroth::Decorator) } let(:decorator) { decorator_class.new(object) } let(:model) { build(:dummy_model) } let(:object) { model } describe '.build_reader' do it do expect { described_class.build_reader(decorator_class, :age) } .to add_method(:age).to(decorator) end it do described_class.build_reader(decorator_class, :age) expect(decorator.age).to eq(model.age) end end end
Version data entries
7 entries across 7 versions & 1 rubygems