# テストとテスト対象の間を移動する

> For the complete documentation index, see [llms.txt](https://www.jetbrains.com/ja-jp/help/ruby/llms.txt).

RubyMine では、テストとテスト対象の間をすばやく移動できます。

Procedure: テストからテスト対象へ移動

1. エディターでテストクラスを開きます。

2. メインメニューまたはエディターのコンテキストメニューから、  `移動 | テスト対象`  を選択します。 または、 `Ctrl+Shift+T` (Windows), `⌘ ⇧ T` (macOS), `⌘ ⇧ T` (IntelliJ IDEA Classic (macOS)), `⌃ ⇧ T` (macOS System Shortcuts), `Ctrl+Shift+T` (XWin), `Ctrl+Shift+T` (GNOME), `Ctrl+Shift+T` (KDE), `Ctrl+Shift+T` (Emacs), `Ctrl+Shift+T` (Sublime Text), `Ctrl+Shift+T` (Sublime Text (macOS)), `Ctrl+Shift+T` (Visual Studio), `Ctrl+Shift+T` (Visual Studio (macOS)), `Ctrl+Alt+T` (TextMate), `Ctrl+Shift+T` (NetBeans), `Ctrl+Shift+T` (Eclipse), `Ctrl+Shift+T` (Eclipse (macOS)) を押します。

現在のテストクラスのテスト対象がエディターの専用タブで開き、フォーカスが得られます。

Procedure: クラスまたはファイルからそのテストに移動する

1. エディターでクラスを開きます。 メソッドからそのテストに移動する場合は、このメソッドにキャレットを置きます。

2. `移動 | テスト`  に進みます。 または、 `Ctrl+Shift+T` (Windows), `⌘ ⇧ T` (macOS), `⌘ ⇧ T` (IntelliJ IDEA Classic (macOS)), `⌃ ⇧ T` (macOS System Shortcuts), `Ctrl+Shift+T` (XWin), `Ctrl+Shift+T` (GNOME), `Ctrl+Shift+T` (KDE), `Ctrl+Shift+T` (Emacs), `Ctrl+Shift+T` (Sublime Text), `Ctrl+Shift+T` (Sublime Text (macOS)), `Ctrl+Shift+T` (Visual Studio), `Ctrl+Shift+T` (Visual Studio (macOS)), `Ctrl+Alt+T` (TextMate), `Ctrl+Shift+T` (NetBeans), `Ctrl+Shift+T` (Eclipse), `Ctrl+Shift+T` (Eclipse (macOS)) を押します。

3. 複数のテストがテスト対象に関連付けられている場合は、リストから目的のテストを選択します。 現在のクラスのテストがエディターの専用タブで開き、フォーカスを得ます。

> **Note:**
> RubyMine が既存のテストを開かない場合は、テストが保存されているディレクトリが [テストソースルートとしてマーク](create-tests.html#mark_test_sources_root)されていることを確認してください。

> **Warning:**
> テストメソッドの名前を変更すると、テストとそのサブジェクト間を移動できなくなります。

