Pull over tests from failed 1.8.7 branch.
Refactor some code.
- format_return_value becomes it's own method instead of a one line ternary operator.
- fetch_default is a method instead of a variable defined inside the method_missing block.