3 ms·
It's worth noting that rspec gives you lots of options. @micropost.should respond_to(:content) is perfectly valid, and IMO, much cleaner.
by cheald 14y ago
It's worth noting that rspec gives you lots of options.
@micropost.should respond_to(:content)
is perfectly valid, and IMO, much cleaner.
- danneu 14y agoBut 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!