Merge pull request #186 from Nagasaki45/string_interpolation

Add string interpolation koan. Fix #184
This commit is contained in:
Jay Hayes
2017-04-06 11:26:42 -05:00
committed by GitHub
2 changed files with 5 additions and 0 deletions

View File

@@ -7,6 +7,10 @@ defmodule Strings do
assert "hello" == ___ assert "hello" == ___
end end
koan "Values may be inserted into strings by interpolation" do
assert "1 + 1 = #{1 + 1}" == ___
end
koan "They can be put together" do koan "They can be put together" do
assert "hello world" == ___ <> "world" assert "hello world" == ___ <> "world"
end end

View File

@@ -5,6 +5,7 @@ defmodule StringTests do
test "Strings" do test "Strings" do
answers = [ answers = [
"hello", "hello",
"1 + 1 = 2",
"hello ", "hello ",
"hello world", "hello world",
"An incredible day", "An incredible day",