RSpec Code Examples

 

 

pending spec with no implementation
is pending (PENDING: Not yet implemented)
pending command with block format
with content that would fail
is pending (PENDING: No reason given)
with content that would pass
fails n.nnnns
passing spec
passesn.nnnns
failing spec
fails n.nnnns
a failing spec with odd backtraces
fails with a backtrace that has no file n.nnnns
foo
(erb):1
-1# Couldn't get snippet for (erb)
fails with a backtrace containing an erb file n.nnnns
Exception
/foo.html.erb:1 :in `<main>': foo (RuntimeError)
-1# Couldn't get snippet for /foo.html.erb