mock ã¨ããè¨èã ãã¯ç¥ã£ã¦ããããå®éã« mock ãä½ã£ã¦ä½¿ã£ããã¨ã¯ãªãã£ãããããã mock ã使ããªãã¨ãªãã¨æãå§ããã¨ãã㧠mock 㯠stub ãããªãã¨èããã¦ããããã¼ãstub ã£ã¦ãªãã ããã ä»å㯠RR ( Double Ruby ) ã® v 1.0.2 ã試ããªãã stub 㨠mock ã®éããå¦ãã 話ã btakita/rr - GitHub stubä¾ãã° RR ã§ã¯
3. Mockã¨Stubã¨ã¯ Test Doubleã¨ããæ¦å¿µã®ä¸é¨ã Double ã¨ã¯ã代役ã®ãã¨ã§ããã¹ãç¨ã«ãªãã¸ã§ã¯ãã å ¥ãæ¿ããã¨ãã«ä¸è¬çã«ç¨ããããè¨èã [1] xUnit Test Patterns by Gerard Meszaros http://xunitpatterns.com/Test%20Double.html 4. Test Doubleã®ç¨®é¡ Dummy åã渡ããããã¨ã¯ãããå®éã«ä½¿ç¨ããããã¨ã¯ãªãããã©ã¡ã¼ã¿ãª ã¹ããåãããã ãã¨ãã£ãå ´åã«å©ç¨ããããã¨ãå¤ãã Fake å®éã«åä½ããããã«å®è£ ããã¦ã¯ããããææãããã¦ãã製åç ã«ã¯åããªãã Stub ãã¹ãæã®å¼ã³åºãã«å¯¾ãã¦ããããã決ããããå¤ãè¿ããã®ã Spy å¼ã³åºãã«åºã¥ãæ å ±ãè¨é²ããã¹ã¿ããä¾ãã°ãä½éã¡ã¼ã«ãéã ãããã ãã«ã¦ã³ãããã¡ã¼ã«ãµã¼ãã¹ãªã©ã該å½ã
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}