Sha256: 8c621317892c92935bf9cf5a9b7a941f11e646dc34043d874335511bb5775471

Contents?: true

Size: 443 Bytes

Versions: 2

Compression:

Stored size: 443 Bytes

Contents

module PropCheck
  ##
  # Integration with RSpec
  module RSpec
    # To make it available within examples
    def self.extend_object(obj)
      obj.define_method(:forall) do |*args, **kwargs, &block|
        if block_given?
          PropCheck::Property.forall(*args, **kwargs) do
            instance_exec(self, &block)
          end
        else
          PropCheck::Property.forall(*args, **kwargs)
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
prop_check-0.7.1 lib/prop_check/rspec.rb
prop_check-0.7.0 lib/prop_check/rspec.rb