We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent db04f8d commit 7cd3b6fCopy full SHA for 7cd3b6f
README.md
@@ -59,3 +59,25 @@ Simple mocking framework for Lua based on CppUMock
59
mock(f1):shouldBeCalled():
60
andAlso(mock(f2):shouldBeCalled()):
61
when(function() f1(); f2() end)
62
+
63
+## Extra Credit For Readability
64
65
+ local m1 = mock:mockFunction()
66
+ local m2 = mock:mockFunction()
67
68
+ function somethingShouldHappen()
69
+ return mock(m1):shouldBeCalled()
70
+ end
71
72
+ function anotherThingShouldHappen()
73
+ return mock(m2):shouldBeCalledWith(1, 2, 3)
74
75
76
+ function theCodeUnderTestRuns()
77
+ m1()
78
+ m2(1, 2, 3)
79
80
81
+ somethingShouldHappen():
82
+ andAlso(anotherThingShouldHappen()):
83
+ when(theCodeUnderTestRuns)
0 commit comments