-
-
Notifications
You must be signed in to change notification settings - Fork 50
Macbeth Analyzer Solution #8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are some speech tags that have more than 1 speaker. I made this mistake initially too. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you provide an example?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line number: 1738 of macbeth.xml
<SPEECH>
<SPEAKER>MACBETH</SPEAKER>
<SPEAKER>LENNOX</SPEAKER>
<LINE>What's the matter.</LINE>
</SPEECH>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ugh. we need a DTD for this file to fail against ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here you go: www.ibiblio.org/xml/examples/shakespeare/play.dtd
;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, I missed this too
|
I know when using rspec, the common approach is to put all your test files in a separate spec directory; don't know if this is the case with MiniTest, but doing that would make it clearer where things are. I thought at first you didn't have any tests :=) |
|
agreed, i should probably move the tests to a directory. there isn't too much documentation on minitest, but i never used it before so wanted to try it. testing the 'puts' method was very tricky!! :) |
|
"I like the way you organized your tests with a separate describe for each group of related tests." thanks. that's the way i was taught and it reads well when you run verbose. also, if you name the describe with the method name like describe '#parse' it's VERY easy to find the bug. |
|
I know what you mean; I really like the fact that MiniTest automatically includes the capture_io method! Jon Seidel, CMC® Effective Decisions... Priceless! From: elubin [mailto:[email protected]] agreed, i should probably move the tests to a directory. there isn't too much documentation on minitest, but i never used it before so wanted to try it. testing the 'puts' method was very tricky!! :) — |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A multiline string would probably be more readable here, e.g. by using """.
|
Good effort overall! I think the biggest thing you could do to improve this is to treat your test code as equally important as your production code. Your production code is clean, well-organized, and easy to read. Your tests don't quite achieve the same level of clarity. |
No description provided.