This repository has been archived on 2020-02-24. You can view files and clone it, but cannot push or open issues or pull requests.
plsql-spec-example/spec/helpers/inspect_helpers.rb
2020-01-16 14:11:30 +03:00

18 lines
379 B
Ruby

# As ruby-plsql returns NUMBER values as BigDecimal values in Ruby then
# change format how they are by default displayed
BigDecimal.class_eval do
def inspect
to_s('F')
end
end
# As ruby-plsql returns NULL as Ruby nil then change nil.inspect to return 'NULL'
NilClass.class_eval do
def inspect
'NULL'
end
end
# NULL looks more like SQL NULL than nil
NULL = nil