Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
32 lines (26 sloc) 583 Bytes
require 'gibbler/mixins'
require 'gibbler/history'
# "raises exception when reverting to unknown gibble"
begin
a = {}
a.gibbler_commit
a.gibbler_revert! '2222222222222222222222222222222222222222'
rescue Gibbler::BadDigest
:success
end
#=> :success
# "raises exception when reverting and there's no history"
begin
a = []
a.gibbler_revert!
rescue Gibbler::NoHistory
:success
end
#=> :success
# "raises exception when reverting an unsupported object"
begin
:kimmy.gibbler_revert!
rescue NoMethodError
:success
end
#=> :success
Jump to Line
Something went wrong with that request. Please try again.