Need a unique gift idea?
A Pastebin account makes a great Christmas gift
SHARE
TWEET

Untitled

a guest Mar 8th, 2018 42 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. it "raises a TypeError when the given String can't be fully converted to a Float" do
  2.     lambda { Float('0.0.0')  }.should raise_error(ArgumentError)
  3. end
  4.  
  5. # Possibility 1
  6. it "raises a TypeError when the given String can't be fully converted to a Float", :should_raise => ArgumentError do
  7.   Float('0.0.0')
  8. end
  9.  
  10. # Possibility 2
  11. it_should_raise(ArgumentError) do
  12.   Float('0.0.0')
  13. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top