Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
goshacodes authored Jan 10, 2025
1 parent 1e2edde commit 38bb25f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class MySpec extends AnyFunSpec, Matchers, Stubs:

foo.foo.returns(10)
foo.foo shouldBe 10 // method returns set result
foo.times shouldBe 1 // number of times method called
foo.foo.times shouldBe 1 // number of times method called

test("one arg"):
val foo: Stub[Foo] = stub[Foo]
Expand All @@ -55,8 +55,8 @@ class MySpec extends AnyFunSpec, Matchers, Stubs:

foo.foo1(1) shouldBe 2
foo.foo1(2) shouldBe 0
foo.times shouldBe 2
foo.calls shouldBe List(1, 2) // get arguments
foo.foo1.times shouldBe 2
foo.foo1.calls shouldBe List(1, 2) // get arguments


test("two args"):
Expand All @@ -68,9 +68,9 @@ class MySpec extends AnyFunSpec, Matchers, Stubs:

foo.foo2(0, 0) shouldBe 1
foo.foo2(2, 3) shouldBe 0
foo.times shouldBe 2
foo.calls shouldBe List((0, 0), (2, 3)) // get arguments
foo.times((0, 0)) shouldBe 1 // get number of times arguments caught
foo.foo2.times shouldBe 2
foo.foo2.calls shouldBe List((0, 0), (2, 3)) // get arguments
foo.foo2.times((0, 0)) shouldBe 1 // get number of times arguments caught

```

Expand Down

0 comments on commit 38bb25f

Please sign in to comment.