Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Aug 22nd, 2012  |  syntax: None  |  size: 0.46 KB  |  hits: 8  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. describe HerpDerps do
  2.  
  3.   # Fails with
  4.   # NameError:
  5.   #    undefined local variable or method `terminate' for
  6.   #    #<RSpec::Core::ExampleGroup::Nested_1::Nested_3::Nested_1:0x007ff96bac96f0>
  7.   it 'exits cleanly' do
  8.     # expecting call to `exit`
  9.     -> { described_class.run }.should terminate
  10.   end
  11.  
  12.   it 'exits with non-zero status code' do
  13.     #expecting call to `abort` or `exit(false)`
  14.     -> { described_class.run }.should terminate.with_code(1)
  15.   end
  16.  
  17. end