surrogate:帮助处理模拟对象的框架-源码

上传者: 42114046 | 上传时间: 2021-09-25 22:26:25 | 文件大小: 54KB | 文件类型: ZIP
关于 Handrolling mocks 是最好的,但涉及更多不必要的开销,并且通常有用的错误消息较少。 代理通过为您的对象赋予大多数模拟所需的常见东西来解决这个问题。 目前它仅与 RSpec 集成。 在 1.0 版本发布之前,此代码库应被视为易变的。 外部接口应该相当稳定,每个 0.ab 版本都具有对 b 的任何更改(即仅重构和新功能)的向后兼容性,以及对 a 的更改可能的接口更改(尽管可能很小)。 目前不鼓励根据代码的内部结构(自述文件中未显示的任何内容)。 如果您确实想这样做(例如为测试/单元制作接口),请告诉我,我会通知您/ fork 您的 gem 并帮助更新它,以了解我引入的任何重大更改。 特征 Mock 不会偏离真实类,因为将 Mock 的签名与真实类的签名进行比较。 支持默认值 轻松覆盖值 用于断言发生了什么的 RSpec 匹配器(调用了什么,使用什么参数,多少次) 用

文件下载

资源详情

[{"title":"( 48 个子文件 54KB ) surrogate:帮助处理模拟对象的框架-源码","children":[{"title":"surrogate-master","children":[{"title":"Changelog.md <span style='color:#111;'> 2.93KB </span>","children":null,"spread":false},{"title":".travis.yml <span style='color:#111;'> 202B </span>","children":null,"spread":false},{"title":"Readme.md.mountain_berry_fields <span style='color:#111;'> 15.88KB </span>","children":null,"spread":false},{"title":"surrogate.gemspec <span style='color:#111;'> 1.09KB </span>","children":null,"spread":false},{"title":"Rakefile <span style='color:#111;'> 273B </span>","children":null,"spread":false},{"title":"Readme.md <span style='color:#111;'> 13.08KB </span>","children":null,"spread":false},{"title":"Gemfile <span style='color:#111;'> 377B </span>","children":null,"spread":false},{"title":"spec","children":[{"title":"acceptance_spec.rb <span style='color:#111;'> 5.05KB </span>","children":null,"spread":false},{"title":"rspec","children":[{"title":"initialization_matcher_spec.rb <span style='color:#111;'> 2.23KB </span>","children":null,"spread":false},{"title":"block_support_spec.rb <span style='color:#111;'> 7.69KB </span>","children":null,"spread":false},{"title":"messages_spec.rb <span style='color:#111;'> 1.10KB </span>","children":null,"spread":false},{"title":"predicate_matcher_spec.rb <span style='color:#111;'> 6.44KB </span>","children":null,"spread":false},{"title":"noun_matcher_spec.rb <span style='color:#111;'> 6.42KB </span>","children":null,"spread":false},{"title":"rspec_mocks_integration_spec.rb <span style='color:#111;'> 1.11KB </span>","children":null,"spread":false},{"title":"verb_matcher_spec.rb <span style='color:#111;'> 5.86KB </span>","children":null,"spread":false},{"title":"substitute_for_spec.rb <span style='color:#111;'> 16.29KB </span>","children":null,"spread":false}],"spread":true},{"title":"unit","children":[{"title":"map_method_name_to_ivar_spec.rb <span style='color:#111;'> 1014B </span>","children":null,"spread":false},{"title":"api_comparer_spec.rb <span style='color:#111;'> 9.40KB </span>","children":null,"spread":false},{"title":"argument_errorizer_spec.rb <span style='color:#111;'> 4.20KB </span>","children":null,"spread":false}],"spread":true},{"title":"other_shit_spec.rb <span style='color:#111;'> 8.17KB </span>","children":null,"spread":false},{"title":"defining_api_methods_spec.rb <span style='color:#111;'> 13.65KB </span>","children":null,"spread":false},{"title":"spec_helper.rb <span style='color:#111;'> 26B </span>","children":null,"spread":false}],"spread":true},{"title":".gitignore <span style='color:#111;'> 33B </span>","children":null,"spread":false},{"title":"lib","children":[{"title":"surrogate.rb <span style='color:#111;'> 367B </span>","children":null,"spread":false},{"title":"surrogate","children":[{"title":"rspec.rb <span style='color:#111;'> 2.05KB </span>","children":null,"spread":false},{"title":"endower.rb <span style='color:#111;'> 6.11KB </span>","children":null,"spread":false},{"title":"method_definition.rb <span style='color:#111;'> 1.53KB </span>","children":null,"spread":false},{"title":"values.rb <span style='color:#111;'> 1.47KB </span>","children":null,"spread":false},{"title":"porc_reflector.rb <span style='color:#111;'> 1.35KB </span>","children":null,"spread":false},{"title":"rspec","children":[{"title":"abstract_failure_message.rb <span style='color:#111;'> 1.62KB </span>","children":null,"spread":false},{"title":"verb_matcher.rb <span style='color:#111;'> 2.81KB </span>","children":null,"spread":false},{"title":"invocation_matcher.rb <span style='color:#111;'> 2.13KB </span>","children":null,"spread":false},{"title":"with_filter.rb <span style='color:#111;'> 2.18KB </span>","children":null,"spread":false},{"title":"substitution_matcher.rb <span style='color:#111;'> 3.49KB </span>","children":null,"spread":false},{"title":"noun_matcher.rb <span style='color:#111;'> 2.81KB </span>","children":null,"spread":false},{"title":"initialization_matcher.rb <span style='color:#111;'> 264B </span>","children":null,"spread":false},{"title":"block_asserter.rb <span style='color:#111;'> 3.93KB </span>","children":null,"spread":false},{"title":"predicate_matcher.rb <span style='color:#111;'> 2.51KB </span>","children":null,"spread":false},{"title":"times_predicate.rb <span style='color:#111;'> 483B </span>","children":null,"spread":false}],"spread":false},{"title":"api_comparer.rb <span style='color:#111;'> 7.22KB </span>","children":null,"spread":false},{"title":"surrogate_instance_reflector.rb <span style='color:#111;'> 406B </span>","children":null,"spread":false},{"title":"surrogate_class_reflector.rb <span style='color:#111;'> 2.10KB </span>","children":null,"spread":false},{"title":"version.rb <span style='color:#111;'> 40B </span>","children":null,"spread":false},{"title":"hatchery.rb <span style='color:#111;'> 1.82KB </span>","children":null,"spread":false},{"title":"hatchling.rb <span style='color:#111;'> 4.04KB </span>","children":null,"spread":false},{"title":"argument_errorizer.rb <span style='color:#111;'> 1.49KB </span>","children":null,"spread":false},{"title":"invocation.rb <span style='color:#111;'> 304B </span>","children":null,"spread":false}],"spread":false}],"spread":true},{"title":"todo <span style='color:#111;'> 2.41KB </span>","children":null,"spread":false}],"spread":false}],"spread":true}]

评论信息

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明