Sha256: a8f9210b3dc549de4f9eed12c05008ed25758e68509732d689c4a815bb99e9cc

Contents?: true

Size: 612 Bytes

Versions: 5

Compression:

Stored size: 612 Bytes

Contents

require "spec/spec_helper"

module RR
  module Expectations
    describe TimesCalledExpectation, :shared => true do
      attr_reader :space, :object, :method_name, :double_injection, :double, :expectation
      before do
        @space = Space.new
        @object = Object.new
        @method_name = :foobar
        @double_injection = space.double_injection(object, method_name)
        @double = space.double(double_injection)
        double.with_any_args
      end

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

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rr-0.4.6 spec/rr/expectations/times_called_expectation/times_called_expectation_helper.rb
rr-0.4.8 spec/rr/expectations/times_called_expectation/times_called_expectation_helper.rb
rr-0.4.7 spec/rr/expectations/times_called_expectation/times_called_expectation_helper.rb
rr-0.4.4 spec/rr/expectations/times_called_expectation/times_called_expectation_helper.rb
rr-0.4.5 spec/rr/expectations/times_called_expectation/times_called_expectation_helper.rb