Sha256: 5b4ef2ca9c8b5286a1edbcb08a746657d7eef087e9dc05c83b8f38942ddc0bb5

Contents?: true

Size: 372 Bytes

Versions: 10

Compression:

Stored size: 372 Bytes

Contents

module Fakes
  module ArgBehaviour
    attr_accessor :return_value,:times_called

    def and_return(item)
      @return_value = item
    end

    def capture_args(args)
      @times_called += 1
      @called_args = args
    end

    def matches?(args)
      return @args == args
    end

    def was_called_with?(args)
      return @called_args == args
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
fakes-0.2.2 lib/core/arg_behaviour.rb
fakes-0.2.1 lib/core/arg_behaviour.rb
fakes-0.2.0 lib/fakes/arg_behaviour.rb
fakes-0.1.9 lib/fakes/arg_behaviour.rb
fakes-0.1.7 lib/fakes/arg_behaviour.rb
fakes-0.1.6 lib/fakes/arg_behaviour.rb
fakes-0.1.5 lib/fakes/arg_behaviour.rb
fakes-0.1.4 lib/fakes/arg_behaviour.rb
fakes-0.1.3 lib/fakes/arg_behaviour.rb
fakes-0.1.2 lib/fakes/arg_behaviour.rb