Sha256: 3207c54baaf55b6478cd0f80ef660c54a8734cdadd6870ae8a07f80b04f0440b
Contents?: true
Size: 716 Bytes
Versions: 6
Compression:
Stored size: 716 Bytes
Contents
# encoding: utf-8 require 'spec_helper' require 'github_api/core_ext/hash' describe Github::Validations::Required do let(:validator) { klaz = Class.new.extend(described_class) } context '#_validate_inputs' do let(:required) { ['param_a', 'param_c'] } let(:provided) { { 'param_a' => true, 'param_c' => true } } it 'detect missing parameter' do expect { validator._validate_inputs(required, provided.except('param_c')). should be_false }.to raise_error(Github::Error::RequiredParams) end it 'asserts correct required parameters' do validator._validate_inputs(required, provided).should be_true end end end # Github::Validations::Required
Version data entries
6 entries across 6 versions & 1 rubygems