Created
November 7, 2009 21:29
-
-
Save jcbozonier/228903 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Normal: | |
| describe "When reading past last character in the string" do | |
| before(:each) do | |
| @string_reader = StringReader.new("ab") | |
| @string_reader.read | |
| @string_reader.read | |
| end | |
| it "should asplode!" do | |
| lambda{@string_reader.read}.should raise_error | |
| end | |
| end | |
| Desired: | |
| describe "When reading past last character in the string" do | |
| before(:each) do | |
| @string_reader = StringReader.new("ab") | |
| @string_reader.read | |
| @string_reader.read | |
| end | |
| it "should asplode!" do | |
| running{@string_reader.read}.should raise_error | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment