Skip to content

robot-simulator: Rewrite tests to use hspec with fail-fast. #251

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

Merged
merged 1 commit into from
Aug 6, 2016
Merged

robot-simulator: Rewrite tests to use hspec with fail-fast. #251

merged 1 commit into from
Aug 6, 2016

Conversation

rbasso
Copy link
Contributor

@rbasso rbasso commented Aug 2, 2016

  • Rewrite tests to use hspec.
  • Remove old tests.
  • Add tests to match x-common.
  • Remove import of Robot in test suite.
  • Remove export of Robot in example solution.
  • Remove export of Robot in stub solution.
  • Remove instructions to derive (Eq, Ord) in stub.

Related to #211.

This exercise is too distant from what is defined in x-common, so it will probably be good to rewrite it. I tried to leave comments about the deviations to make the task easier.

I also simplified the interface so that it's not necessary to export the Robot data type. This is recommended for better modularization and allows more creative solutions.

West @=? turnRight South
North @=? turnRight West
, testCase "robbie" $ do
let robbie :: Robot
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder why we gave it a name...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

guess it's always been that way (assume we ported from clojure) exercism/exercism@33216cf

@petertseng
Copy link
Member

👍 if you add the missing space

- Rewrite tests to use `hspec`.
- Remove old tests.
- Add tests to match `x-common`.
- Remove import of `Robot` in test suite.
- Remove export of `Robot` in example solution.
- Remove export of `Robot` in stub solution.
- Remove instructions to derive `(Eq, Ord)` in stub.
@rbasso rbasso merged commit 0f472af into exercism:hspec-fail-fast Aug 6, 2016
@rbasso rbasso deleted the hspec-robot-simulator branch August 6, 2016 20:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants