Skip to content

Commit 36b6efe

Browse files
committed
Update README.md
1 parent 7cd3b6f commit 36b6efe

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Simple mocking framework for Lua based on CppUMock
1616

1717
mock = require 'Mock'
1818

19-
o = {}
19+
local o = {}
2020
o.m = mock:mockMethod()
2121

2222
mock(m):shouldBeCalled():
@@ -26,7 +26,7 @@ Simple mocking framework for Lua based on CppUMock
2626

2727
mock = require 'Mock'
2828

29-
someTable = {
29+
local someTable = {
3030
foo = function() end,
3131
bar = function() end
3232
}
@@ -40,7 +40,7 @@ Simple mocking framework for Lua based on CppUMock
4040

4141
mock = require 'Mock'
4242

43-
someObject = {}
43+
local someObject = {}
4444
function someObject:foo() end
4545
function someObject:bar() end
4646

@@ -62,6 +62,8 @@ Simple mocking framework for Lua based on CppUMock
6262

6363
## Extra Credit For Readability
6464

65+
mock = require 'Mock'
66+
6567
local m1 = mock:mockFunction()
6668
local m2 = mock:mockFunction()
6769

@@ -78,6 +80,7 @@ Simple mocking framework for Lua based on CppUMock
7880
m2(1, 2, 3)
7981
end
8082

83+
-- Actual test:
8184
somethingShouldHappen():
8285
andAlso(anotherThingShouldHappen()):
8386
when(theCodeUnderTestRuns)

0 commit comments

Comments
 (0)