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-2.1.1 spec/integration/yard/sinclair/options_parser_spec.rb
sinclair-2.1.0 spec/integration/yard/sinclair/options_parser_spec.rb
sinclair-2.0.1 spec/integration/yard/sinclair/options_parser_spec.rb
sinclair-2.0.0 spec/integration/yard/sinclair/options_parser_spec.rb
sinclair-1.16.3 spec/integration/yard/sinclair/options_parser_spec.rb
sinclair-1.16.2 spec/integration/yard/sinclair/options_parser_spec.rb
sinclair-1.16.1 spec/integration/yard/sinclair/options_parser_spec.rb
sinclair-1.16.0 spec/integration/yard/sinclair/options_parser_spec.rb
sinclair-1.15.0 spec/integration/yard/sinclair/options_parser_spec.rb
sinclair-1.14.2 spec/integration/yard/sinclair/options_parser_spec.rb
sinclair-1.14.1 spec/integration/yard/sinclair/options_parser_spec.rb
sinclair-1.14.0 spec/integration/yard/sinclair/options_parser_spec.rb
sinclair-1.13.0 spec/integration/yard/sinclair/options_parser_spec.rb
sinclair-1.12.1 spec/integration/yard/sinclair/options_parser_spec.rb
sinclair-1.12.0 spec/integration/yard/sinclair/options_parser_spec.rb
sinclair-1.11.0 spec/integration/yard/sinclair/options_parser_spec.rb
sinclair-1.10.0 spec/integration/yard/sinclair/options_parser_spec.rb
sinclair-1.9.0 spec/integration/yard/sinclair/options_parser_spec.rb
sinclair-1.8.0 spec/integration/yard/sinclair/options_parser_spec.rb
sinclair-1.7.0 spec/integration/yard/sinclair/options_parser_spec.rb