Sha256: f64d0a0566697ff5996779850a3ecf6152e43af6cce5848d6363707a349f2d9e
Contents?: true
Size: 886 Bytes
Versions: 1
Compression:
Stored size: 886 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. def its(method, &spec) i = It.new(described, (challenges + [Defi.send(method)]), helpers.dup) result = begin i.instance_eval(&spec) rescue Spectus::Result::Fail => f f end 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.3.3 | lib/fix/its.rb |