Sha256: 2f10ec0b1037555b776596d59c38066da9e1efac236b960db8920dab1c48e34d
Contents?: true
Size: 804 Bytes
Versions: 1
Compression:
Stored size: 804 Bytes
Contents
require 'fix' # Namespace for the Fix framework. # # @api public # module Fix # Open the on class. # # @api private # class On # Add its method to the DSL. # # @api public # # @example Its absolute value must equal 42 # its(:abs) { MUST equal 42 } # # @param method [Symbol] The identifier of a method. # @param spec [Proc] A spec to compare against the computed value. # # @return [Array] List of results. # # rubocop:disable AbcSize def its(method, &spec) i = It.new(described, (challenges + [Defi.send(method)]), helpers.dup) result = i.verify(&spec) if configuration.fetch(:verbose, true) print result.to_char(configuration.fetch(:color, false)) end results << result end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
fix-its-0.5.1 | lib/fix/its.rb |