Sha256: 6c04adb24a95fb3804d24c040b944244993a566c4a6368708ebd8af8ec570803

Contents?: true

Size: 647 Bytes

Versions: 22

Compression:

Stored size: 647 Bytes

Contents

# frozen_string_literal: true

require 'spec_helper'

describe Sinclair::OptionsParser do
  describe 'yard' do
    subject(:model) { described_class::Dummy.new(options) }

    let(:options) { { switch: false, option_1: 10, option_2: 20 } }

    describe '#the_method' do
      it 'returns the value for option given' do
        expect(model.the_method).to eq('The value is not 10 but 20')
      end
    end

    describe '.skip_validation' do
      it 'accepts options' do
        options = BuilderOptions.new(name: 'Joe', age: 10)

        expect(options.name).to eq('Joe')
        expect(options.try(:age)).to be_nil
      end
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
sinclair-1.6.7 spec/integration/yard/sinclair/options_parser_spec.rb
sinclair-1.6.6 spec/integration/yard/sinclair/options_parser_spec.rb