タグ

ブックマーク / scrapbox.io/graphql-ruby-ja (1)

  • Testing in the Kibela project - Notes on GraphQL for Ruby

    Integration Test / Request Spec ではあくまでもactionのカバレッジを満たすために実行しています つまり疎通確認とactionにおける例外処理のみ spec/graphql/ に、KibelaSchema.execute() を行うspecを追加して必要な単位(queryのfieldやtype)ごとにテストしています test patternのカバレッジはargumentsの違いのみで、たとえばフィールドは全部指定するパターンを1つだけ行ってます .execute() の戻り値は #to_json() して rspec-json_matcher でexpectationを書いています resolverを直接呼ぶテストはしていません tips: RubyMineの場合、 queryを書くときのheredoc tokenを GRAQPHQL にすると、quer

    Testing in the Kibela project - Notes on GraphQL for Ruby
  • 1