Skip to content

Commit 1c83732

Browse files
committed
Add instructions for always overwriting.
1 parent a14f2ff commit 1c83732

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

selfie.dev/src/pages/jvm/get-started.mdx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,10 +159,19 @@ To set the mode, you set the `selfie` or `SELFIE` environment variable or system
159159
[MAVEN]
160160
user@machine repo % mvn test -Dselfie=overwrite
161161

162-
[GRADLE (only works if you followed the install instructions above re: environment)]
162+
[GRADLE (only works if you followed the install instructions)]
163163
user@machine repo % ./gradlew test -Pselfie=overwrite
164164
```
165165

166+
In Gradle, you can also go to `~/.gradle/gradle.properties` and add `selfie=overwrite`. Now snapshots will always overwrite on your machine (for every test task which was setup properly).
167+
168+
```kotlin
169+
test {
170+
environment project.properties.subMap(["selfie"]) // build.gradle
171+
environment(properties.filter { it.key == "selfie" }) // build.gradle.kts
172+
}
173+
```
174+
166175
## Beyond toString
167176

168177
All of the examples so far have asserted on Strings. You can also do inline literal assertions on primitive values, and disk assertions on byte arrays:

0 commit comments

Comments
 (0)