Sha256: 88ed47252152cdfe322d1c963cceb8b98198123fad84dea67c2167d54b79cec6

Contents?: true

Size: 682 Bytes

Versions: 25

Compression:

Stored size: 682 Bytes

Contents

module RR
  module DoubleDefinitions
    class ChildDoubleDefinitionCreate < DoubleDefinitionCreate # :nodoc
      attr_reader :parent_double_definition

      def initialize(parent_double_definition)
        @parent_double_definition = parent_double_definition
        super()
      end

      def root_subject
        parent_double_definition.root_subject
      end

      def instance_of(*args)
        raise NoMethodError
      end

    protected
      def add_strategy(subject, method_name, definition_eval_block, &block)
        super do
          block.call
          parent_double_definition.implemented_by(lambda {|*args| subject })
        end
      end
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
rr-3.1.1 lib/rr/double_definitions/child_double_definition_create.rb
rr-3.1.0 lib/rr/double_definitions/child_double_definition_create.rb
rr-3.0.9 lib/rr/double_definitions/child_double_definition_create.rb
rr-3.0.8 lib/rr/double_definitions/child_double_definition_create.rb
rr-3.0.7 lib/rr/double_definitions/child_double_definition_create.rb
rr-3.0.6 lib/rr/double_definitions/child_double_definition_create.rb
rr-3.0.5 lib/rr/double_definitions/child_double_definition_create.rb
rr-3.0.4 lib/rr/double_definitions/child_double_definition_create.rb
rr-3.0.3 lib/rr/double_definitions/child_double_definition_create.rb
rr-3.0.2 lib/rr/double_definitions/child_double_definition_create.rb
rr-3.0.1 lib/rr/double_definitions/child_double_definition_create.rb
rr-3.0.0 lib/rr/double_definitions/child_double_definition_create.rb
rr-1.2.1 lib/rr/double_definitions/child_double_definition_create.rb
rr-1.2.0 lib/rr/double_definitions/child_double_definition_create.rb
rr-1.1.2 lib/rr/double_definitions/child_double_definition_create.rb
rr-1.1.2.rc1 lib/rr/double_definitions/child_double_definition_create.rb
rr-1.1.1 lib/rr/double_definitions/child_double_definition_create.rb
rr-1.1.1.rc1 lib/rr/double_definitions/child_double_definition_create.rb
rr-1.1.0 lib/rr/double_definitions/child_double_definition_create.rb
rr-1.1.0.rc3 lib/rr/double_definitions/child_double_definition_create.rb