Skip to content
adrpac edited this page Aug 13, 2010 · 7 revisions

Don’t like RSpec’s should methods for assertions? No problem, we won’t force you to. You can use the familiar Test::Unit assert methods by defining your own World block in versions prior to 0.2.3.2:

require 'test/unit/assertions'

World do |world|
  world.extend(Test::Unit::Assertions)
  world
end

or in version 0.2.3.2 and later:

require 'test/unit/assertions'

World(Test::Unit::Assertions)

You can see a full example under the examples

Clone this wiki locally