Testing hash contents using RSpec

后端 未结 4 578
南旧
南旧 2021-02-06 20:37

I have a test like so:

it \"should not indicate backwards jumps if the checker position is not a king\" do
    board = Board.new
    game_board = board.create_te         


        
4条回答
  •  既然无缘
    2021-02-06 20:57

    Syntax has changed for RSpec 3, but include matcher is still the one:

    expect(jump_locations).to include(
      "upper_left" => true,
      "upper_right" => false,
      "lower_left" => false,
      "lower_right" => true
    )
    

    See built-in-matchers#include-matcher.

提交回复
热议问题