Guest User

Untitled

a guest
Apr 23rd, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. class ARModel
  2. before_destroy :do_stuff
  3.  
  4. def do_stuff
  5. true
  6. end
  7. end
  8.  
  9. def test_should_call_do_stuff_before_destroy
  10. assert_equal true, ARModel.before_destroy.include?(:do_stuff)
  11. end
  12.  
  13. def test_do_stuff_returns_true
  14. assert_equal true, ARModel.new.do_stuff
  15. end
Add Comment
Please, Sign In to add comment