X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=spec%2Funit%2Fplugins%2Fmcollective%2Fvalidator%2Ftypecheck_validator_spec.rb;fp=spec%2Funit%2Fplugins%2Fmcollective%2Fvalidator%2Ftypecheck_validator_spec.rb;h=0000000000000000000000000000000000000000;hb=d1f1649ba43c5cbc43c4beb2380096ba051d646a;hp=248d29e0249fa40e4b5936298a19ca6dfa599da2;hpb=8a3fe7daeecccf43dd71c59371c5005400d35101;p=packages%2Fprecise%2Fmcollective.git diff --git a/spec/unit/plugins/mcollective/validator/typecheck_validator_spec.rb b/spec/unit/plugins/mcollective/validator/typecheck_validator_spec.rb deleted file mode 100644 index 248d29e..0000000 --- a/spec/unit/plugins/mcollective/validator/typecheck_validator_spec.rb +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env rspec -require 'spec_helper' -require File.dirname(__FILE__) + '/../../../../../plugins/mcollective/validator/typecheck_validator.rb' - -module MCollective - module Validator - describe "#validate" do - it "should raise an exception if the given value is not of the supplied type" do - [[1, String], ['test', :integer], ['test', :float], ['test', :number], [1, :string], ['test', :boolean]].each do |val| - expect{ - TypecheckValidator.validate(*val) - }.to raise_error(ValidatorError, "value should be a #{val[1].to_s}") - end - end - - it "should not raise an exception if the given value is of the supplied type" do - [["test", String], [1, :integer], [1.2, :float], [1, :number], ["test", :string], [true, :boolean]].each do |val| - TypecheckValidator.validate(*val) - end - end - end - end -end