mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-05-18 14:53:05 +08:00
Translate everything-claude-code repository to Japanese including: - 17 root documentation files - 60 agent documentation files - 80 command documentation files - 99 rule files across 18 language directories (common, angular, arkts, cpp, csharp, dart, fsharp, golang, java, kotlin, perl, php, python, ruby, rust, swift, typescript, web) - 199 skill documentation files Total: 455 files translated to Japanese with: - Consistent terminology glossary applied throughout - YAML field names preserved in English (name, description, etc.) - Code blocks and examples untouched (comments translated) - Markdown structure and relative links preserved - Professional translation maintaining technical accuracy This translation expands ECC accessibility to Japanese-speaking developers and teams. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2.4 KiB
2.4 KiB
paths
| paths | ||||||
|---|---|---|---|---|---|---|
|
Ruby テスト
このファイルは common/testing.md を Ruby および Rails 固有のコンテンツで拡張します。
フレームワーク
- Rails アプリがデフォルトの Rails テストスタックに従っている場合は Minitest を使用する。
- プロジェクトで既に確立されている場合、またはチームがそれに関する明確な本番規約を持っている場合は RSpec を使用する。
- マイグレーションの理由なしに、同じ機能領域内で Minitest と RSpec を混在させない。
テストピラミッド
- 高速なドメインロジックはモデル、サービス、クエリ、ポリシー、ジョブのテストに配置する。
- HTTP コントラクト、認証動作、リダイレクト、ステータスコード、レスポンスの形状にはリクエスト/コントローラテストを使用する。
- ブラウザ依存の重要なフローにのみ Capybara を使用したシステムテストを使用する。焦点を絞り、安定させる。
- バックグラウンドジョブは動作のユニットテストとキュー/エンキューコントラクトの統合テストでカバーする。
フィクスチャとファクトリ
- Rails フィクスチャがプロジェクトのデフォルトで、データグラフが小さい場合はそれを使用する。
- シナリオが明示的なオブジェクト構築や複雑なトレイトを必要とする場合は
factory_botを使用する。 - テストデータはアサートされる動作の近くに配置する。セットアップコストを隠すグローバルフィクスチャを避ける。
コマンド
プロジェクトローカルのコマンドを優先する:
bin/rails test
bin/rails test test/models/user_test.rb
bundle exec rspec
bundle exec rspec spec/models/user_spec.rb
カバレッジ
- カバレッジが強制される場合は SimpleCov を使用する。しきい値は CI に設定し、低価値なテストでブランチカバレッジを水増ししない。
- バグ修正では、本番コードを変更する前にリグレッションテストを追加する。
参考
リポジトリ全体の RED -> GREEN -> REFACTOR ループについてはスキル: tdd-workflow を参照。