Sha256: 3379248c7f254a2fbe89726a930f84f08f867152ca3cc67efe223197554b71a1

Contents?: true

Size: 551 Bytes

Versions: 1

Compression:

Stored size: 551 Bytes

Contents

shared_examples "a validator #validate method" do
  it "sets expectation key" do
    expect(res[:key]).to eql(expectation_key)
  end

  it "sets assertions" do
    expect(res[:assertions].to_a.sort_by { |h| h[:path] }).to eql(expected_assertions.sort_by { |h| h[:path] })
  end

  it "sets diff" do
    expect(res[:diff]).to eql(expected_diff)
  end

  it "sets failed assertions" do
    expect(res[:failed_assertions]).to eql(expected_failed_assertions)
  end

  it "sets valid flag" do
    expect(res[:valid]).to eql(expected_diff.empty?)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
api-validator-0.0.1 spec/support/validator_shared_examples.rb