Created
February 26, 2013 14:58
-
-
Save austinthecoder/5039018 to your computer and use it in GitHub Desktop.
This file contains 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
class Parser | |
def errors | |
@errors ||= [] | |
end | |
end | |
describe Parser do | |
describe '#errors' do | |
it "is an empty list" do | |
subject.errors.should == [] | |
end | |
it "always returns the same list" do | |
errors = subject.errors | |
subject.errors.should equal errors # tests that they're the same object | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment