mirror of
https://github.com/Xevion/exercism.git
synced 2025-12-14 02:11:41 -06:00
59 lines
1.6 KiB
Markdown
59 lines
1.6 KiB
Markdown
# Bob
|
|
|
|
Bob is a lackadaisical teenager. In conversation, his responses are very limited.
|
|
|
|
Bob answers 'Sure.' if you ask him a question.
|
|
|
|
He answers 'Whoa, chill out!' if you yell at him.
|
|
|
|
He answers 'Calm down, I know what I'm doing!' if you yell a question at him.
|
|
|
|
He says 'Fine. Be that way!' if you address him without actually saying
|
|
anything.
|
|
|
|
He answers 'Whatever.' to anything else.
|
|
|
|
Bob's conversational partner is a purist when it comes to written communication and always follows normal rules regarding sentence punctuation in English.
|
|
|
|
## Running tests
|
|
|
|
Execute the tests with:
|
|
|
|
```bash
|
|
$ mix test
|
|
```
|
|
|
|
### Pending tests
|
|
|
|
In the test suites, all but the first test have been skipped.
|
|
|
|
Once you get a test passing, you can unskip the next one by
|
|
commenting out the relevant `@tag :pending` with a `#` symbol.
|
|
|
|
For example:
|
|
|
|
```elixir
|
|
# @tag :pending
|
|
test "shouting" do
|
|
assert Bob.hey("WATCH OUT!") == "Whoa, chill out!"
|
|
end
|
|
```
|
|
|
|
Or, you can enable all the tests by commenting out the
|
|
`ExUnit.configure` line in the test suite.
|
|
|
|
```elixir
|
|
# ExUnit.configure exclude: :pending, trace: true
|
|
```
|
|
|
|
If you're stuck on something, it may help to look at some of
|
|
the [available resources](https://exercism.io/tracks/elixir/resources)
|
|
out there where answers might be found.
|
|
|
|
## Source
|
|
|
|
Inspired by the 'Deaf Grandma' exercise in Chris Pine's Learn to Program tutorial. [http://pine.fm/LearnToProgram/?Chapter=06](http://pine.fm/LearnToProgram/?Chapter=06)
|
|
|
|
## Submitting Incomplete Solutions
|
|
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|