Sha256: 3978580b2d4d77fc847b3f133f27eaff45525498ac74aac758d4441aa8a9b06b

Contents?: true

Size: 962 Bytes

Versions: 10

Compression:

Stored size: 962 Bytes

Contents

# frozen_string_literal: true

# Define negated matchers for use with composable matchers and compound
# expectations.
#
# @see https://relishapp.com/rspec/rspec-expectations/v/3-8/docs/composing-matchers
# @see https://relishapp.com/rspec/rspec-expectations/v/3-8/docs/compound-expectations
RSpec::Matchers.define_negated_matcher :exclude, :include
RSpec::Matchers.define_negated_matcher :excluding, :including
RSpec::Matchers.define_negated_matcher :not_eq, :eq

# Allows us to check that a block doesn't raise an exception while also
# checking for other changes using compound expectations; since you can't chain
# a negative (`not_to`) with any other matchers
#
# @see https://relishapp.com/rspec/rspec-expectations/v/3-8/docs/compound-expectations
RSpec::Matchers.define_negated_matcher :not_change, :change
RSpec::Matchers.define_negated_matcher :not_raise_error, :raise_error
RSpec::Matchers.define_negated_matcher :not_raise_exception, :raise_exception

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
radius-spec-0.13.0 lib/radius/spec/rspec/negated_matchers.rb
radius-spec-0.12.1 lib/radius/spec/rspec/negated_matchers.rb
radius-spec-0.12.0 lib/radius/spec/rspec/negated_matchers.rb
radius-spec-0.11.0 lib/radius/spec/rspec/negated_matchers.rb
radius-spec-0.10.0 lib/radius/spec/rspec/negated_matchers.rb
radius-spec-0.9.0 lib/radius/spec/rspec/negated_matchers.rb
radius-spec-0.8.0 lib/radius/spec/rspec/negated_matchers.rb
radius-spec-0.7.0 lib/radius/spec/rspec/negated_matchers.rb
radius-spec-0.6.0 lib/radius/spec/rspec/negated_matchers.rb
radius-spec-0.5.0 lib/radius/spec/rspec/negated_matchers.rb