Sha256: 8892a5837593bf192f8e195b5b83a002d60dc6a17a862fa29bcc88f8c708bb16

Contents?: true

Size: 609 Bytes

Versions: 2

Compression:

Stored size: 609 Bytes

Contents

require 'spec_helper'

RSpec.describe DefaultValue do
  let(:klass)    { Class.new }
  let(:method)   { :the_method }
  let(:value)    { Random.rand(100) }
  let(:builder)  { described_class.new(klass, method, value) }
  let(:instance) { klass.new }

  context 'when the builder runs' do
    it do
      expect do
        described_class.new(klass, method, value).build
      end.to add_method(method).to(instance)
    end
  end

  context 'when the builder runs' do
    it do
      expect do
        described_class.new(klass, method, value).build
      end.to add_method(method).to(klass)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
sinclair-1.1.1 spec/integration/readme/matcher_spec.rb
sinclair-1.1.0 spec/integration/readme/matcher_spec.rb