qo
qo copied to clipboard
Remove redundant else branch from HTTP_Matcher
HTTP_Matcher = Qo.create_pattern_match(branches: [
Qo.create_branch(name: 'success', precondition: Net::HTTPSuccess),
Qo.create_branch(name: 'error', precondition: Net::HTTPError),
Qo::Braches::ElseBranch
])
actually you don't have to include else branch to branches, since it's already included here https://github.com/baweaver/qo/blob/master/lib/qo/pattern_matchers/pattern_match.rb#L14
True, yes, but in a way this makes it more explicit what branches it accepts. I may have to rethink the underlying code a bit.