Sha256: be04c1e2d51e205f88187b28ef6c8968cc3a07673bf708cd98f3e31765323216

Contents?: true

Size: 1.87 KB

Versions: 68

Compression:

Stored size: 1.87 KB

Contents

if !System.get_env("EXERCISM_TEST_EXAMPLES") do
  Code.load_file("bob.exs", __DIR__)
end

ExUnit.start()
ExUnit.configure(exclude: :pending, trace: true)

defmodule BobTest do
  use ExUnit.Case

  test "stating something" do
    assert Bob.hey("Tom-ay-to, tom-aaaah-to.") == "Whatever."
  end

  @tag :pending
  test "shouting" do
    assert Bob.hey("WATCH OUT!") == "Whoa, chill out!"
  end

  @tag :pending
  test "asking a question" do
    assert Bob.hey("Does this cryogenic chamber make me look fat?") == "Sure."
  end

  @tag :pending
  test "talking forcefully" do
    assert Bob.hey("Let's go make out behind the gym!") == "Whatever."
  end

  @tag :pending
  test "talking in capitals" do
    assert Bob.hey("This Isn't Shouting!") == "Whatever."
  end

  @tag :pending
  test "asking in capitals" do
    assert Bob.hey("THIS ISN'T SHOUTING?") == "Calm down, I know what I'm doing!"
  end

  @tag :pending
  test "shouting numbers" do
    assert Bob.hey("1, 2, 3 GO!") == "Whoa, chill out!"
  end

  @tag :pending
  test "shouting with special characters" do
    assert Bob.hey("ZOMG THE %^*@#$(*^ ZOMBIES ARE COMING!!11!!1!") == "Whoa, chill out!"
  end

  @tag :pending
  test "shouting with no exclamation mark" do
    assert Bob.hey("I HATE YOU") == "Whoa, chill out!"
  end

  @tag :pending
  test "statement containing question mark" do
    assert Bob.hey("Ending with ? means a question.") == "Whatever."
  end

  @tag :pending
  test "silence" do
    assert Bob.hey("") == "Fine. Be that way!"
  end

  @tag :pending
  test "prolonged silence" do
    assert Bob.hey("  ") == "Fine. Be that way!"
  end

  @tag :pending
  test "only numbers" do
    assert Bob.hey("1, 2, 3") == "Whatever."
  end

  @tag :pending
  test "question with numbers" do
    assert Bob.hey("4?") == "Sure."
  end

  @tag :pending
  test "shouting in Russian" do
    assert Bob.hey("УХОДИ") == "Whoa, chill out!"
  end
end

Version data entries

68 entries across 68 versions & 1 rubygems

Version Path
trackler-2.2.1.159 tracks/elixir/exercises/bob/bob_test.exs
trackler-2.2.1.158 tracks/elixir/exercises/bob/bob_test.exs
trackler-2.2.1.157 tracks/elixir/exercises/bob/bob_test.exs
trackler-2.2.1.156 tracks/elixir/exercises/bob/bob_test.exs
trackler-2.2.1.155 tracks/elixir/exercises/bob/bob_test.exs
trackler-2.2.1.154 tracks/elixir/exercises/bob/bob_test.exs
trackler-2.2.1.153 tracks/elixir/exercises/bob/bob_test.exs
trackler-2.2.1.152 tracks/elixir/exercises/bob/bob_test.exs
trackler-2.2.1.151 tracks/elixir/exercises/bob/bob_test.exs
trackler-2.2.1.150 tracks/elixir/exercises/bob/bob_test.exs
trackler-2.2.1.149 tracks/elixir/exercises/bob/bob_test.exs
trackler-2.2.1.148 tracks/elixir/exercises/bob/bob_test.exs
trackler-2.2.1.147 tracks/elixir/exercises/bob/bob_test.exs
trackler-2.2.1.146 tracks/elixir/exercises/bob/bob_test.exs
trackler-2.2.1.145 tracks/elixir/exercises/bob/bob_test.exs
trackler-2.2.1.144 tracks/elixir/exercises/bob/bob_test.exs
trackler-2.2.1.143 tracks/elixir/exercises/bob/bob_test.exs
trackler-2.2.1.142 tracks/elixir/exercises/bob/bob_test.exs
trackler-2.2.1.141 tracks/elixir/exercises/bob/bob_test.exs
trackler-2.2.1.140 tracks/elixir/exercises/bob/bob_test.exs