Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- it "raises a TypeError when the given String can't be fully converted to a Float" do
- lambda { Float('0.0.0') }.should raise_error(ArgumentError)
- end
- # Possibility 1
- it "raises a TypeError when the given String can't be fully converted to a Float", :should_raise => ArgumentError do
- Float('0.0.0')
- end
- # Possibility 2
- it_should_raise(ArgumentError) do
- Float('0.0.0')
- end
Add Comment
Please, Sign In to add comment