Currently the access check supports value declaration checks either via defining a Range object, or by providing a Proc. Reality is that the values are not always in a Range, but could be an Array of objects that are not part of the sequence. i.e. list of roles, selectable options, etc. Changing https://github.com/inossidabile/protector/blob/master/lib/protector/dsl.rb#L215 to check when Enumerable instead of Range will cover all those cases. (The include? method comes from the Enumerable module for either of the classes anyways.
Currently the access check supports value declaration checks either via defining a Range object, or by providing a Proc. Reality is that the values are not always in a Range, but could be an Array of objects that are not part of the sequence. i.e. list of roles, selectable options, etc. Changing https://github.com/inossidabile/protector/blob/master/lib/protector/dsl.rb#L215 to check
when Enumerable
instead ofRange
will cover all those cases. (Theinclude?
method comes from theEnumerable
module for either of the classes anyways.http://www.ruby-doc.org/core-1.9.3/Enumerable.html http://www.ruby-doc.org/core-1.9.3/Range.html#method-i-include-3F http://www.ruby-doc.org/core-1.9.3/Array.html#method-i-include-3F http://www.ruby-doc.org/core-1.9.3/Hash.html#method-i-include-3F