Skip to content

Commit

Permalink
Fix spelling mistakes (#502)
Browse files Browse the repository at this point in the history
Signed-off-by: Josh Soref <[email protected]>
  • Loading branch information
jsoref authored Aug 29, 2023
1 parent ccddcc1 commit 706807b
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .scala-steward.conf
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# more information about the CRON expressions that are supported.
#
# Note that the date parts of the CRON expression are matched exactly
# while the the time parts are only used to abide to the frequency of
# while the time parts are only used to abide to the frequency of
# the given expression.
#
# Default: @asap
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ The library has independent developers, release cycle and versioning from core m
* Repositories: [Maven Central](https://search.maven.org/search?q=mockito-scala)


### Please ensure you don't declare `mockito-core` as a dependency. `mockito-scala` will pull the appropiate version automatically
### Please ensure you don't declare `mockito-core` as a dependency. `mockito-scala` will pull the appropriate version automatically


### Note: For more examples and use cases than the ones shown below, please refer to the library's specific tests
Expand Down Expand Up @@ -554,7 +554,7 @@ The workaround is quite easy though, just provide a value (or a matcher) for tha

## Numeric matchers

A new set of matchers to deal with number comparison were introduced (see [Scalactic tolerance](#tolerance) for aproximation),
A new set of matchers to deal with number comparison were introduced (see [Scalactic tolerance](#tolerance) for approximation),
the syntax is slightly different to make them more readable, so now we can write stuff like (notice the 'n')
```scala
aMock.method(5)
Expand Down Expand Up @@ -608,7 +608,7 @@ aMock.method(n =~ 5.0 +- 0.001) was called
An instance of `org.scalactic.Prettifier` is implicitly pulled by the `EqTo` matcher to provide a nicer (and customisable) printing of
your types when an verification fails. `EqTo` is also used internally by `Mockito` to print the arguments of every invocation, so you'll
get a consisten printing for both the expectation and the actual call.
get a consistent printing for both the expectation and the actual call.
If you want to customise the print of any type you just need to declare your `Prettifier` in the implicit scope like
Expand Down Expand Up @@ -747,7 +747,7 @@ val failingMock: Foo = mock[Foo].returnsMT[ErrorOr, MyClass](*) returns Left(Err
## Mocking Scala `object`
Since version 1.16.0 it is possible to mock `object` methods, given that such definitions are global, the way to mock them is sligtly different in order to ensure we restore the real implementation of the object after we are done
Since version 1.16.0 it is possible to mock `object` methods, given that such definitions are global, the way to mock them is slightly different in order to ensure we restore the real implementation of the object after we are done
To enable `withObjectMocked` feature, it is mandatory to create the file `src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker` containing a single line:
Expand Down
8 changes: 4 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,9 @@ task writeActualVersion {
def isSnapshot = version.endsWith("-SNAPSHOT")

if (isSnapshot) {
println "Building a -SNAPSHOT version (Github release and Maven Central tasks are skipped)"
println "Building a -SNAPSHOT version (GitHub release and Maven Central tasks are skipped)"
tasks.named("githubRelease") {
//snapshot versions do not produce changelog / Github releases
//snapshot versions do not produce changelog / GitHub releases
enabled = false
}
tasks.named("closeAndReleaseStagingRepository") {
Expand All @@ -111,11 +111,11 @@ tasks.register("releaseSummary") {
println "RELEASE SUMMARY\n" +
" SNAPSHOTS released to: https://s01.oss.sonatype.org/content/repositories/snapshots/org/mockito/\n" +
" Release to Maven Central: SKIPPED FOR SNAPSHOTS\n" +
" Github releases: SKIPPED FOR SNAPSHOTS"
" GitHub releases: SKIPPED FOR SNAPSHOTS"
} else {
println "RELEASE SUMMARY\n" +
" Release to Maven Central (available after delay): https://repo1.maven.org/maven2/org/mockito/\n" +
" Github releases: https://github.com/mockito/mockito-scala/releases"
" GitHub releases: https://github.com/mockito/mockito-scala/releases"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package org.mockito
package matchers

/**
* Matcher tranformed from one type to another with a function to modify the input
* Matcher transformed from one type to another with a function to modify the input
*
* Technically this is 'contramapped' but that seemed like an unnecessarily jargony name.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class MatcherProps extends Properties("matchers") {
val transformed = Transformed(ma)(f)
val matches = transformed.matches(value)
classify(matches, "matches", "doesn't match") {
(matches ?= ma.matches(f(value))) :| "matches if underlying matches transfomed value" &&
(matches ?= ma.matches(f(value))) :| "matches if underlying matches transformed value" &&
(transformed.toString ?= s"transformed($ma: $f)") :| "renders to string correctly"
}
}
Expand Down
4 changes: 2 additions & 2 deletions docs/release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
- 2020-11-07 - [2 commits](https://github.com/mockito/mockito-scala/compare/v1.16.0...v1.16.1) by [Rebeca Perez](https://github.com/cardie20) (1), [Scala Steward](https://github.com/scala-steward) (1) - published to [![Bintray](https://img.shields.io/badge/Bintray-1.16.1-green.svg)](https://bintray.com/mockito/maven/mockito-scala/1.16.1)
- Fixes Issue #303 [(#308)](https://github.com/mockito/mockito-scala/pull/308)
- Update mockito-core to 3.5.15 [(#304)](https://github.com/mockito/mockito-scala/pull/304)
- How to mock scala obejct [(#303)](https://github.com/mockito/mockito-scala/issues/303)
- How to mock scala object [(#303)](https://github.com/mockito/mockito-scala/issues/303)

#### 1.16.0
- 2020-09-27 - [1 commit](https://github.com/mockito/mockito-scala/compare/v1.15.1...v1.16.0) by [Bruno Bonanno](https://github.com/bbonanno) - published to [![Bintray](https://img.shields.io/badge/Bintray-1.16.0-green.svg)](https://bintray.com/mockito/maven/mockito-scala/1.16.0)
Expand All @@ -36,7 +36,7 @@
- NPE caused by mocking a generic method multiple times [(#256)](https://github.com/mockito/mockito-scala/issues/256)
- Mocking method return Any as type throws Exception [(#254)](https://github.com/mockito/mockito-scala/issues/254)
- IdiomaticMockitoSyntax appears not to handle thrown by without annotation [(#251)](https://github.com/mockito/mockito-scala/issues/251)
- NPE when mocking a trait with a NonEmpyString argument [(#250)](https://github.com/mockito/mockito-scala/issues/250)
- NPE when mocking a trait with a NonEmptyString argument [(#250)](https://github.com/mockito/mockito-scala/issues/250)

#### 1.14.8
- 2020-06-23 - [1 commit](https://github.com/mockito/mockito-scala/compare/v1.14.7...v1.14.8) by [Ben Spencer](https://github.com/dangerousben) - published to [![Bintray](https://img.shields.io/badge/Bintray-1.14.8-green.svg)](https://bintray.com/mockito/maven/mockito-scala/1.14.8)
Expand Down
2 changes: 1 addition & 1 deletion scalatest/src/test/scala/user/org/mockito/Issue254.scala
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class Issue254 extends AnyFlatSpec with MockitoSugar with Matchers {

// will explode with
// java.lang.ClassNotFoundException: scala.Any
// because it tries to instatiate Any at org/mockito/ReflectionUtils.scala:57
// because it tries to instantiate Any at org/mockito/ReflectionUtils.scala:57
when(myMock.methodReturningAny("test"))
.thenReturn("some value")

Expand Down

0 comments on commit 706807b

Please sign in to comment.