Added rspec test for save_hook.