Rails ActiveSupport: How to assert that an error is raised?
So unit testing isn’t really in activesupport. Ruby comes with a typical xunit framework in the standard libs (Test::Unit in ruby 1.8.x, MiniTest in ruby 1.9), and the stuff in activesupport just adds some stuff to it. If you are using Test::Unit/MiniTest assert_raise(Exception) { whatever.merge } if you are using rspec (unfortunately poorly documented, but … Read more