# SpannedSubject.RubyText

Artifact: [androidx.media3:media3-test-utils](https://developer.android.com/jetpack/androidx/releases/media3) [View Source](https://cs.android.com/search?q=file:androidx/media3/test/utils/truth/SpannedSubject.java+class:androidx.media3.test.utils.truth.SpannedSubject.RubyText)

*** ** * ** ***


```
public interface SpannedSubject.RubyText
```

<br />

*** ** * ** ***

Allows assertions about a span's ruby text and its position.

## Summary

| ### Public methods |
|---|---|
| `abstract https://developer.android.com/reference/androidx/media3/test/utils/truth/SpannedSubject.AndSpanFlags` | `https://developer.android.com/reference/androidx/media3/test/utils/truth/SpannedSubject.RubyText#withTextAndPosition(java.lang.String,int)(https://developer.android.com/reference/java/lang/String.html text, @https://developer.android.com/reference/androidx/media3/common/text/TextAnnotation.Position int position)` Checks that at least one of the matched spans has the expected `text`. |

## Public methods

### withTextAndPosition

```
abstract SpannedSubject.AndSpanFlags withTextAndPosition(String text, @TextAnnotation.Position int position)
```

Checks that at least one of the matched spans has the expected `text`.

| Parameters |
|---|---|
| `https://developer.android.com/reference/java/lang/String.html text` | The expected text. |
| `@https://developer.android.com/reference/androidx/media3/common/text/TextAnnotation.Position int position` | The expected position of the text. |

| Returns |
|---|---|
| `https://developer.android.com/reference/androidx/media3/test/utils/truth/SpannedSubject.AndSpanFlags` | A `https://developer.android.com/reference/androidx/media3/test/utils/truth/SpannedSubject.WithSpanFlags` object for optional additional assertions on the flags. |