Sha256: 6166b5a349cb9205ecf51a64b31d9c2fc7f3b0e4b8da689448e4cc966a60eccc

Contents?: true

Size: 521 Bytes

Versions: 16

Compression:

Stored size: 521 Bytes

Contents

# frozen_string_literal: false

require 'spec_helper'

describe 'yard Sinclair#eval_and_add_method' do
  describe 'Building a initial value class method' do
    let(:klass) do
      Class.new do
        include InitialValuer
        attr_writer :age

        initial_value_for :age, 20
      end
    end

    context 'when it has not been initialized' do
      it do
        object = klass.new

        expect(object.age).to eq(20)
        object.age = 30
        expect(object.age).to eq(30)
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
sinclair-2.1.1 spec/integration/yard/sinclair/eval_and_add_method_spec.rb
sinclair-2.1.0 spec/integration/yard/sinclair/eval_and_add_method_spec.rb
sinclair-2.0.1 spec/integration/yard/sinclair/eval_and_add_method_spec.rb
sinclair-2.0.0 spec/integration/yard/sinclair/eval_and_add_method_spec.rb
sinclair-1.16.3 spec/integration/yard/sinclair/eval_and_add_method_spec.rb
sinclair-1.16.2 spec/integration/yard/sinclair/eval_and_add_method_spec.rb
sinclair-1.16.1 spec/integration/yard/sinclair/eval_and_add_method_spec.rb
sinclair-1.16.0 spec/integration/yard/sinclair/eval_and_add_method_spec.rb
sinclair-1.15.0 spec/integration/yard/sinclair/eval_and_add_method_spec.rb
sinclair-1.14.2 spec/integration/yard/sinclair/eval_and_add_method_spec.rb
sinclair-1.14.1 spec/integration/yard/sinclair/eval_and_add_method_spec.rb
sinclair-1.14.0 spec/integration/yard/sinclair/eval_and_add_method_spec.rb
sinclair-1.13.0 spec/integration/yard/sinclair/eval_and_add_method_spec.rb
sinclair-1.12.1 spec/integration/yard/sinclair/eval_and_add_method_spec.rb
sinclair-1.12.0 spec/integration/yard/sinclair/eval_and_add_method_spec.rb
sinclair-1.11.0 spec/integration/yard/sinclair/eval_and_add_method_spec.rb