Sha256: d5d24691ea1fc2fb4eececd23830a6cb0930178388634f13d1dc9abe9455b4a6

Contents?: true

Size: 801 Bytes

Versions: 1

Compression:

Stored size: 801 Bytes

Contents

module RR
  module Expectations
    describe TimesCalledExpectation, :shared => true do
      attr_reader :subject, :method_name, :double_injection, :double, :double_definition
      it_should_behave_like "Swapped Space"
      before do
        @subject = Object.new
        @method_name = :foobar
        @double_injection = space.double_injection(subject, method_name)
        @double_definition = RR::DoubleDefinitions::DoubleDefinition.new(
          RR::DoubleDefinitions::DoubleDefinitionCreator.new,
          subject
        )
        @double = new_double(double_injection)
        double.definition.with_any_args.any_number_of_times
      end

      def raises_expectation_error(&block)
        lambda {block.call}.should raise_error(RR::Errors::TimesCalledError)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rr-0.10.10 spec/rr/expectations/times_called_expectation/times_called_expectation_helper.rb