Sha256: d66d60fe4ac08d6a5e2d53aab81eff5bfabb21977546a83c2fab1d04d074ee53

Contents?: true

Size: 912 Bytes

Versions: 15

Compression:

Stored size: 912 Bytes

Contents

# frozen_string_literal: true

RSpec.shared_examples 'API constraints' do
  context 'AAF shared implementation' do
    context '#matches?' do
      context 'with default: false' do
        subject { described_class.new(version: '1', default: false) }

        it 'is true for a valid request' do
          expect(subject.matches?(matching_request)).to be_truthy
        end

        it 'is false for a non-matching request' do
          expect(subject.matches?(non_matching_request)).to be_falsey
        end
      end

      context 'with default: true' do
        subject { described_class.new(version: '1', default: true) }

        it 'is true for a valid request' do
          expect(subject.matches?(matching_request)).to be_truthy
        end

        it 'is true for a non-matching request' do
          expect(subject.matches?(non_matching_request)).to be_truthy
        end
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
aaf-gumboot-2.6.3 lib/gumboot/shared_examples/api_constraints.rb
aaf-gumboot-2.6.2 lib/gumboot/shared_examples/api_constraints.rb
aaf-gumboot-2.6.1 lib/gumboot/shared_examples/api_constraints.rb
aaf-gumboot-2.6.0 lib/gumboot/shared_examples/api_constraints.rb
aaf-gumboot-2.5.1 lib/gumboot/shared_examples/api_constraints.rb
aaf-gumboot-2.5.0 lib/gumboot/shared_examples/api_constraints.rb
aaf-gumboot-2.4.0 lib/gumboot/shared_examples/api_constraints.rb
aaf-gumboot-2.2.0 lib/gumboot/shared_examples/api_constraints.rb
aaf-gumboot-2.1.4 lib/gumboot/shared_examples/api_constraints.rb
aaf-gumboot-2.1.3 lib/gumboot/shared_examples/api_constraints.rb
aaf-gumboot-2.1.1 lib/gumboot/shared_examples/api_constraints.rb
aaf-gumboot-2.1.0 lib/gumboot/shared_examples/api_constraints.rb
aaf-gumboot-2.0.1 lib/gumboot/shared_examples/api_constraints.rb
aaf-gumboot-1.2.0 lib/gumboot/shared_examples/api_constraints.rb
aaf-gumboot-1.1.0 lib/gumboot/shared_examples/api_constraints.rb