Re:Rails has Two Default Stacks
by cheald on Monday January 14, 2013 @02:56PM
(#5056260)
It's worth noting that rspec gives you lots of options.
is perfectly valid, and IMO, much cleaner.
[ Parent
| on HN ]
But that's the thing.
rspec: @micropost.should respond_to(:context)
testunit: assert @micropost.respond_to?(:context)
rspec: @micropost.should be_valid
testunit: assert @micropost.valid?
rspec: @micropost.should_not be_valid
testunit: refute @micropost.valid?
The testunit It's Just Ruby examples end up looking like the syntactic sugar!