Method: BaconExpect::Matcher::BaconContext#method_missing
- Defined in:
- lib/bacon-expect/matchers/matchers.rb
#method_missing(method_name, *args, &block) ⇒ Object
75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/bacon-expect/matchers/matchers.rb', line 75 def method_missing(method_name, *args, &block) string_method_name = method_name.to_s match_be = string_method_name.match(/^be_(.*)/) if match_be BeGeneric.new(match_be[1], *args) else match_have = string_method_name.match(/^have_(.*)/) if match_have HaveGeneric.new(match_have[1], *args) else super end end end |