Flowdock
method

parse_expected

Importance_0
RSpec latest stable (1.3.1) - 0 notes - Class: Spec::Matchers::Be

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (1.2.8) is shown here.

These similar methods exist in 1.3.1:

parse_expected(expected) private

No documentation

This method has no description. You can help the RSpec community by adding new notes.

Hide source
# File lib/spec/matchers/be.rb, line 96
        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
Register or log in to add new notes.