RSpec results

RSpec Code Examples

 

 

Errors::Validation
correctly stores the error hash0.00220s
correctly return the JSON equivalent of the error hash as message0.00017s
Handlers::Exceptions
always returns the same instance0.01740s
#report_error
raises an error of the right type0.00114s
Handlers::Messages
can correctly store several errors0.00051s
Validator
integer
succeeds when given an integer0.00142s
fails when given a float0.00016s
fails when not given a numeric0.00013s
options
:rename
correctly renames a key when the value is valid0.00008s
correctly doesn't rename a key when the value is invalid0.00012s
:dependency
succeeds when a dependency is given as a key and respected0.00008s
fails when a dependency is not respected0.00011s
:dependencies
succeeds when dependencies are given as an array and respected0.00008s
fails when one of the dependencies is not respected0.00013s
:required
succeeds when a not required key is not given, but filters nothing0.00186s
suceeds when a key has a required option to false, and is not given, but filters nothing0.00019s
fails when a required key is not given0.00013s
:in
succeeds when the value is effectively in the possible values0.00008s
succeeds if there are no values0.00008s
fails if the value is not in the possible values0.00014s
:equals
succeeds when the value is equal to the given value0.00008s
fails if the value is not equal to the given value0.00020s
:extract
etracts the data when given at true0.00008s
doesn't extract the data when given at false0.00008s
:cast
casts the data when given at true0.00008s
doesn't cast the data when given at false0.00008s
:min
succeeds when a min option is given, and the value is strictly greater than it0.00008s
succeeds when a min option is given, and the value is equal to it0.00008s
fails when a min option is given, but not respected0.00012s
:max
succeeds when a max option is given, and the value is strictly lesser than it0.00007s
succeeds when a max option is given, and the value is equal to it0.00008s
fails when a max option is given, but not respected0.00012s
:between
succeeds when a between option is given, and respected0.00007s
fails when a max between option is given, but the value is strictly lesser0.00012s
fails when a max between option is given, but the value is strictly greater0.00012s
fails when a max between option is given, but the value is equal to the inferior limit0.00012s
fails when a max between option is given, but the value is equal to the superio limit0.00008s
numeric
succeeds when given an integer0.00007s
succeeds when given an decimal number with a dot0.00007s
succeeds when given an decimal number with a comma0.00007s
fails when not given a numeric0.00010s
options
:rename
correctly renames a key when the value is valid0.00007s
correctly doesn't rename a key when the value is invalid0.00011s
:dependency
succeeds when a dependency is given as a key and respected0.00008s
fails when a dependency is not respected0.00010s
:dependencies
succeeds when dependencies are given as an array and respected0.00008s
fails when one of the dependencies is not respected0.00011s
:required
succeeds when a not required key is not given, but filters nothing0.00012s
suceeds when a key has a required option to false, and is not given, but filters nothing0.00012s
fails when a required key is not given0.00014s
:in
succeeds when the value is effectively in the possible values0.00008s
succeeds if there are no values0.00007s
fails if the value is not in the possible values0.00011s
:equals
succeeds when the value is equal to the given value0.00007s
fails if the value is not equal to the given value0.00015s
:extract
etracts the data when given at true0.00007s
doesn't extract the data when given at false0.00007s
:cast
casts the data when given at true0.00007s
doesn't cast the data when given at false0.00007s
:min
succeeds when a min option is given, and the value is strictly greater than it0.00008s
succeeds when a min option is given, and the value is equal to it0.00008s
fails when a min option is given, but not respected0.00011s
:max
succeeds when a max option is given, and the value is strictly lesser than it0.00007s
succeeds when a max option is given, and the value is equal to it0.00008s
fails when a max option is given, but not respected0.00011s
:between
succeeds when a between option is given, and respected0.00007s
fails when a max between option is given, but the value is strictly lesser0.00011s
fails when a max between option is given, but the value is strictly greater0.00011s
fails when a max between option is given, but the value is equal to the inferior limit0.00008s
fails when a max between option is given, but the value is equal to the superio limit0.00011s
:round
rounds the number when the option is passed as an integer0.00009s
rounds the number when the option is passed as a boolean0.00007s
doesn't round the number if passed with another type0.00007s
:floor
floors the number if passed to true0.00007s
doesn't floor the number if passed to false0.00011s
:ceil
ceils the number if passed to true0.00007s
doesn't ceil the number if passed to false0.00007s
text
succeeds when given an instance of String0.00006s
fails when given something else than an instance of String0.00010s
options
:rename
correctly renames a key when the value is valid0.00007s
correctly doesn't rename a key when the value is invalid0.00010s
:dependency
succeeds when a dependency is given as a key and respected0.00007s
fails when a dependency is not respected0.00010s
:dependencies
succeeds when dependencies are given as an array and respected0.00007s
fails when one of the dependencies is not respected0.00011s
:required
succeeds when a not required key is not given, but filters nothing0.00012s
suceeds when a key has a required option to false, and is not given, but filters nothing0.00012s
fails when a required key is not given0.00010s
:in
succeeds when the value is effectively in the possible values0.00007s
succeeds if there are no values0.00007s
fails if the value is not in the possible values0.00011s
:equals
succeeds when the value is equal to the given value0.00007s
fails if the value is not equal to the given value0.00011s
:extract
etracts the data when given at true0.00008s
doesn't extract the data when given at false0.00007s
:cast
casts the data when given at true0.00006s
doesn't cast the data when given at false0.00006s
:regex
succeeds when the regular expression is respected0.00008s
fails when the regular expression is not respected0.00011s
datetime
succeeds when given a valid datetime as a string0.00557s
succeeds when given a valid datetime as a DateTime Object0.00019s
fails when given something else than a valid datetime0.00029s
options
:rename
correctly renames a key when the value is valid0.00011s
correctly doesn't rename a key when the value is invalid0.00015s
:dependency
succeeds when a dependency is given as a key and respected0.00011s
fails when a dependency is not respected0.00012s
:dependencies
succeeds when dependencies are given as an array and respected0.00012s
fails when one of the dependencies is not respected0.00012s
:required
succeeds when a not required key is not given, but filters nothing0.00012s
suceeds when a key has a required option to false, and is not given, but filters nothing0.00013s
fails when a required key is not given0.00013s
:in
succeeds when the value is effectively in the possible values0.00010s
succeeds if there are no values0.00011s
fails if the value is not in the possible values0.00015s
:equals
succeeds when the value is equal to the given value0.00010s
fails if the value is not equal to the given value0.00015s
:extract
etracts the data when given at true0.00007s
doesn't extract the data when given at false0.00011s
:cast
casts the data when given at true0.00010s
doesn't cast the data when given at false0.00008s
date
succeeds when given a valid date as a string0.00009s
succeeds when given a valid date as a Date Object0.00008s
fails when given something else than a valid date0.00014s
options
:rename
correctly renames a key when the value is valid0.00009s
correctly doesn't rename a key when the value is invalid0.00014s
:dependency
succeeds when a dependency is given as a key and respected0.00009s
fails when a dependency is not respected0.00012s
:dependencies
succeeds when dependencies are given as an array and respected0.00009s
fails when one of the dependencies is not respected0.00011s
:required
succeeds when a not required key is not given, but filters nothing0.00012s
suceeds when a key has a required option to false, and is not given, but filters nothing0.00014s
fails when a required key is not given0.00011s
:in
succeeds when the value is effectively in the possible values0.00009s
succeeds if there are no values0.00009s
fails if the value is not in the possible values0.00016s
:equals
succeeds when the value is equal to the given value0.00009s
fails if the value is not equal to the given value0.00012s
:extract
etracts the data when given at true0.00007s
doesn't extract the data when given at false0.00009s
:cast
casts the data when given at true0.00009s
doesn't cast the data when given at false0.00007s
array
succeeds when given an instance of Array0.00007s
fails when given something else than an instance of Array0.00010s
options
:rename
correctly renames a key when the value is valid0.00007s
correctly doesn't rename a key when the value is invalid0.00010s
:dependency
succeeds when a dependency is given as a key and respected0.00007s
fails when a dependency is not respected0.00010s
:dependencies
succeeds when dependencies are given as an array and respected0.00011s
fails when one of the dependencies is not respected0.00011s
:required
succeeds when a not required key is not given, but filters nothing0.00012s
suceeds when a key has a required option to false, and is not given, but filters nothing0.00011s
fails when a required key is not given0.00010s
:in
succeeds when the value is effectively in the possible values0.00007s
succeeds if there are no values0.00007s
fails if the value is not in the possible values0.00011s
:equals
succeeds when the value is equal to the given value0.00007s
fails if the value is not equal to the given value0.00010s
:extract
etracts the data when given at true0.00006s
doesn't extract the data when given at false0.00007s
:cast
casts the data when given at true0.00007s
doesn't cast the data when given at false0.00007s
:contains
succeeds if all values are contained0.00007s
fails if only some values are contained0.00011s
fails if none of the values are contained0.00010s
hash
succeeds when given an instance of Hash0.00007s
fails when given something else than an instance of Hash0.00010s
options
:rename
correctly renames a key when the value is valid0.00008s
correctly doesn't rename a key when the value is invalid0.00010s
:dependency
succeeds when a dependency is given as a key and respected0.00007s
fails when a dependency is not respected0.00010s
:dependencies
succeeds when dependencies are given as an array and respected0.00007s
fails when one of the dependencies is not respected0.00010s
:required
succeeds when a not required key is not given, but filters nothing0.00011s
suceeds when a key has a required option to false, and is not given, but filters nothing0.00012s
fails when a required key is not given0.00011s
:in
succeeds when the value is effectively in the possible values0.00008s
succeeds if there are no values0.00007s
fails if the value is not in the possible values0.00011s
:equals
succeeds when the value is equal to the given value0.00007s
fails if the value is not equal to the given value0.00010s
:extract
etracts the data when given at true0.00006s
doesn't extract the data when given at false0.00007s
:cast
casts the data when given at true0.00006s
doesn't cast the data when given at false0.00006s
:contains
succeeds if all values are contained0.00007s
fails if only some values are contained0.00013s
fails if none of the values are contained0.00010s
:has_keys
succeeds if all keys are contained in the hash0.00007s
fails if not all keys are given in the hash0.00010s
fails if no keys are contained in the hash0.00010s
boolean
succeeds when given a boolean0.00007s
fails when not given a boolean0.00010s
options
:rename
correctly renames a key when the value is valid0.00007s
correctly doesn't rename a key when the value is invalid0.00010s
:dependency
succeeds when a dependency is given as a key and respected0.00008s
fails when a dependency is not respected0.00010s
:dependencies
succeeds when dependencies are given as an array and respected0.00007s
fails when one of the dependencies is not respected0.00010s
:required
succeeds when a not required key is not given, but filters nothing0.01153s
suceeds when a key has a required option to false, and is not given, but filters nothing0.00014s
fails when a required key is not given0.00018s
:in
succeeds when the value is effectively in the possible values0.00010s
succeeds if there are no values0.00011s
fails if the value is not in the possible values0.00014s
:equals
succeeds when the value is equal to the given value0.00017s
fails if the value is not equal to the given value0.00014s
:extract
etracts the data when given at true0.00009s
doesn't extract the data when given at false0.00008s
:cast
casts the data when given at true0.00009s
doesn't cast the data when given at false0.00008s
ssid
succeeds when given a valid SSID0.00017s
fails when not given a SSID0.00021s
options
:rename
correctly renames a key when the value is valid0.00012s
correctly doesn't rename a key when the value is invalid0.00015s
:dependency
succeeds when a dependency is given as a key and respected0.00012s
fails when a dependency is not respected0.00016s
:dependencies
succeeds when dependencies are given as an array and respected0.00011s
fails when one of the dependencies is not respected0.00021s
:required
succeeds when a not required key is not given, but filters nothing0.00013s
suceeds when a key has a required option to false, and is not given, but filters nothing0.00016s
fails when a required key is not given0.00017s
:in
succeeds when the value is effectively in the possible values0.00012s
succeeds if there are no values0.00009s
fails if the value is not in the possible values0.00018s
:equals
succeeds when the value is equal to the given value0.00013s
fails if the value is not equal to the given value0.00015s
:extract
etracts the data when given at true0.00010s
doesn't extract the data when given at false0.00013s
:cast
casts the data when given at true0.00011s
doesn't cast the data when given at false0.00008s
box
succeeds when given a valid box0.00012s
fails when not given a box0.00015s
fails with an invalid top longitude0.00011s
fails with an invalid top latitude0.00015s
fails with an invalid down longitude0.00011s
fails with an invalid down latitude0.00019s
options
:rename
correctly renames a key when the value is valid0.00013s
correctly doesn't rename a key when the value is invalid0.00013s
:dependency
succeeds when a dependency is given as a key and respected0.00011s
fails when a dependency is not respected0.00015s
:dependencies
succeeds when dependencies are given as an array and respected0.00011s
fails when one of the dependencies is not respected0.00020s
:required
succeeds when a not required key is not given, but filters nothing0.00021s
suceeds when a key has a required option to false, and is not given, but filters nothing0.00015s
fails when a required key is not given0.00016s
:in
succeeds when the value is effectively in the possible values0.00013s
succeeds if there are no values0.00017s
fails if the value is not in the possible values0.00018s
:equals
succeeds when the value is equal to the given value0.00013s
fails if the value is not equal to the given value0.00016s
:extract
etracts the data when given at true0.00010s
doesn't extract the data when given at false0.00018s
:cast
casts the data when given at true0.00011s
doesn't cast the data when given at false0.00011s
:at_least
succeeds if the box is bigger than the one given with the at_least option0.00019s
succeeds if the box is equal than the one given with the at_least option0.00012s
fails if the box is smaller than the one given with the at_least option0.00028s
at_most
succeeds if the box is smaller than the one given with the at_most option0.00022s
succeeds if the box is equal than the one given with the at_most option0.00015s
fails if the box is bigger than the one given with the at_most option0.00024s
email
succeeds when given a valid email0.00012s
fails when not given a email0.00021s
options
:rename
correctly renames a key when the value is valid0.00011s
correctly doesn't rename a key when the value is invalid0.00021s
:dependency
succeeds when a dependency is given as a key and respected0.00018s
fails when a dependency is not respected0.00024s
:dependencies
succeeds when dependencies are given as an array and respected0.00018s
fails when one of the dependencies is not respected0.00025s
:required
succeeds when a not required key is not given, but filters nothing0.00032s
suceeds when a key has a required option to false, and is not given, but filters nothing0.00013s
fails when a required key is not given0.00015s
:in
succeeds when the value is effectively in the possible values0.00008s
succeeds if there are no values0.00021s
fails if the value is not in the possible values0.00013s
:equals
succeeds when the value is equal to the given value0.00009s
fails if the value is not equal to the given value0.00022s
:extract
etracts the data when given at true0.00008s
doesn't extract the data when given at false0.00007s
:cast
casts the data when given at true0.00015s
doesn't cast the data when given at false0.00012s
Kharon
Can not use exceptions0.00142s
Can use exceptions0.00011s