SPECS

Path: SPECS
Last Update: Wed Jan 24 12:13:33 CET 2007

TestUnit

  • still works on its own
  • supports should good enough
  • works inside test/spec

SpecDox

  • can unmangle Test::Unit names correctly
  • can unmangle Test::Spec names correctly
  • has sensible fallbacks

flexmock

  • should handle
  • should handle without a block
  • should handle with a block
  • should have a return value
  • should handle missing methods
  • should ignore missing methods
  • should count correctly
  • should raise on bad counts
  • should handle undetermined counts
  • should handle zero counts
  • should have file IO with use
  • should have use
  • should handle failures during use
  • should deal with sequential values
  • respond_to? should return false for non handled methods
  • respond_to? should return true for explicit methods
  • respond_to? should return true when ignoring_missing
  • respond_to? should return true for missing_methods when should_ignore_missing
  • should raise error on unknown method proc
  • should return callable proc on method
  • should return do nothing proc for missing methods
  • works with test/spec

mocha

  • works with test/spec
  • works with test/spec and Enterprise example

stubba

  • works with test/spec and instance method stubbing
  • works with test/spec and class method stubbing
  • works with test/spec and global instance method stubbing

Outer context

Inner context

  • is nested
  • has multiple empty specifications

Second Inner context

  • is indented properly
  • still runs in order of definition

Inmost context

  • works too!
  • whoo!

should.output

  • works for print
  • works for puts
  • works with readline

test/spec

  • has should.satisfy
  • has should.equal
  • has should.raise
  • should.raise should return the exception
  • has should.be.an.instance_of
  • has should.be.nil
  • has should.include
  • has should.be.a.kind_of
  • has should.match
  • has should.be
  • has should.not.raise
  • has should.not.satisfy
  • has should.not.be
  • has should.not.equal
  • has should.not.match
  • has should.throw
  • has should.not.throw
  • has should.respond_to
  • has should.be_close
  • multiple negation works
  • has should.<predicate>
  • has should <operator> (>, >=, <, <=, ===)
  • is robust against careless users
  • should detect warnings
  • should message/blame faults
  • should allow for custom shoulds
  • disabled specification (disabled)

more disabled

  • this is intentional (disabled)

setup/teardown

  • run in the right order

contexts

  • are defined in class scope
  • can include modules

Context First

  • runs before Second

Context Second

  • runs before Last

Context Last

  • runs last

76 specifications, 2 disabled (414 requirements), 0 failures

[Validate]