source: EcnlProtoTool/trunk/mrbgems/mruby-mock/mrblib/expectation.rb@ 331

Last change on this file since 331 was 331, checked in by coas-nagasima, 6 years ago

prototoolに関連するプロジェクトをnewlibからmuslを使うよう変更・更新
ntshellをnewlibの下位の実装から、muslのsyscallの実装に変更・更新
以下のOSSをアップデート
・mruby-1.3.0
・musl-1.1.18
・onigmo-6.1.3
・tcc-0.9.27
以下のOSSを追加
・openssl-1.1.0e
・curl-7.57.0
・zlib-1.2.11
以下のmrbgemsを追加
・iij/mruby-digest
・iij/mruby-env
・iij/mruby-errno
・iij/mruby-iijson
・iij/mruby-ipaddr
・iij/mruby-mock
・iij/mruby-require
・iij/mruby-tls-openssl

  • Property svn:eol-style set to native
  • Property svn:mime-type set to text/x-ruby
File size: 528 bytes
Line 
1module Mocks
2 class Expectation < Hash
3 def add_stub(expected_method)
4 self[:method] = expected_method
5 self[:history] = []
6
7 self
8 end
9
10 def returns(expected_return)
11 self[:returns] = expected_return
12
13 self
14 end
15
16 def with(*expected_args)
17 self[:with] = expected_args
18
19 self
20 end
21
22 def at_least(min)
23 self[:minimum_number] = min
24 end
25
26 def at_most(max)
27 self[:maximum_number] = max
28 end
29
30 def times(num)
31 self[:times] = num
32 end
33
34 end
35end
Note: See TracBrowser for help on using the repository browser.