method
parse_expected
1.2.0 -
Show latest stable
-
0 notes -
Class: Spec::Matchers::Be
- 1.1.4 (0)
- 1.1.12 (0)
- 1.2.0 (0)
- 1.2.8 (0)
- 1.3.0
- 1.3.1
- What's this?
parse_expected(expected)
private
Hide source
# File lib/spec/matchers/be.rb, line 83 def parse_expected(expected) ["be_an_","be_a_","be_"].each do |prefix| handling_predicate! if expected.to_s =~ /^#{prefix}/ set_prefix(prefix) expected = expected.to_s.sub(prefix,"") [true, false, nil].each do |val| return val if val.to_s == expected end return expected.to_sym end end end