Sha256: a4f851281c58a6c4eb6879b7370038c455557c4cfacc89f296feb42a22982d71
Contents?: true
Size: 1.1 KB
Versions: 2
Compression:
Stored size: 1.1 KB
Contents
# frozen_string_literal: true # Namespace for the Fix framework. module Fix # Override Fix's On class. class On # Useful to perform side-effects, e.g., add something in to a database. # # @note To declare an instance variable, use the `let` helper instead. # # @param block [Proc] The block to call. # # @return [#object_id] The given block. def before(*) yield end # @param another_front_object [#object_id] Override the front object. # @param specs [Proc] A set of specs. # # @return [Array] List of results. def describe(another_front_object, *, &specs) o = On.new(another_front_object, results, challenges, helpers.dup, configuration) o.instance_eval(&specs) end # Override the implicit subject. # # @param block [Proc, nil] Another subject inside a block. # # @return [#object_id] The subject. def subject(&block) if block_given? @described = yield else super end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
r_spec-0.3.3 | lib/fix/on.rb |
r_spec-0.3.2 | lib/fix/on.rb |