Sha256: 35e8f8221ef954e25747e7736b7a29c2de8b97b23eac27f2edd8cbc32f976000

Contents?: true

Size: 789 Bytes

Versions: 31

Compression:

Stored size: 789 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 = DoubleDefinitions::DoubleDefinition.new(
          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(Errors::TimesCalledError)
      end
    end
  end
end

Version data entries

31 entries across 31 versions & 5 rubygems

Version Path
adva-0.3.2 test/rr/spec/rr/expectations/times_called_expectation/times_called_expectation_helper.rb
adva-0.3.1 test/rr/spec/rr/expectations/times_called_expectation/times_called_expectation_helper.rb
adva-0.3.0 test/rr/spec/rr/expectations/times_called_expectation/times_called_expectation_helper.rb
adva-0.2.4 test/rr/spec/rr/expectations/times_called_expectation/times_called_expectation_helper.rb
adva-0.2.3 test/rr/spec/rr/expectations/times_called_expectation/times_called_expectation_helper.rb
adva-0.2.2 test/rr/spec/rr/expectations/times_called_expectation/times_called_expectation_helper.rb
adva-0.2.1 test/rr/spec/rr/expectations/times_called_expectation/times_called_expectation_helper.rb
adva-0.2.0 test/rr/spec/rr/expectations/times_called_expectation/times_called_expectation_helper.rb
adva-0.1.4 test/rr/spec/rr/expectations/times_called_expectation/times_called_expectation_helper.rb
adva-0.1.3 test/rr/spec/rr/expectations/times_called_expectation/times_called_expectation_helper.rb
adva-0.1.2 test/rr/spec/rr/expectations/times_called_expectation/times_called_expectation_helper.rb
adva-0.1.1 test/rr/spec/rr/expectations/times_called_expectation/times_called_expectation_helper.rb
adva-0.1.0 test/rr/spec/rr/expectations/times_called_expectation/times_called_expectation_helper.rb
adva-0.0.1 test/rr/spec/rr/expectations/times_called_expectation/times_called_expectation_helper.rb
jferris-rr-0.7.1.0.1239654108 spec/rr/expectations/times_called_expectation/times_called_expectation_helper.rb
redinger-redinger-rr-0.10.3 spec/rr/expectations/times_called_expectation/times_called_expectation_helper.rb
redinger-rr-0.10.4 spec/rr/expectations/times_called_expectation/times_called_expectation_helper.rb
rr-0.10.9 spec/rr/expectations/times_called_expectation/times_called_expectation_helper.rb
rr-0.10.8 spec/rr/expectations/times_called_expectation/times_called_expectation_helper.rb
rr-0.10.7 spec/rr/expectations/times_called_expectation/times_called_expectation_helper.rb