Skip to content

Commit

Permalink
Change pause to use seconds (#5)
Browse files Browse the repository at this point in the history
* change to seconds

* change pull request action format

* fix yml
  • Loading branch information
infomofo authored Jun 3, 2020
1 parent 1295f97 commit 1ea094b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
6 changes: 1 addition & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
name: Scala CI

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
on: [pull_request]

jobs:
build:
Expand Down
4 changes: 2 additions & 2 deletions src/main/scala/com/infomofo/scalassml/SSMLBuilder.scala
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ case class SSMLBuilder(ssmlTree: Elem = <speak></speak>) {
append(<break strength="weak"/>)
}

def pause(ms: Int): SSMLBuilder = {
append(<break time={ms + "ms"}/>)
def pause(s: Int): SSMLBuilder = {
append(<break time={s + "s"}/>)
}

def paragraph(s: SSMLBuilder): SSMLBuilder = {
Expand Down
4 changes: 2 additions & 2 deletions src/test/scala/com/infomofo/scalassml/SSMLBuilderSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ class SSMLBuilderSpec extends FlatSpec {
assert (
SSMLBuilder()
.text("hello")
.pause(1000)
.pause(1)
.text("goodbye")
.trimmedXml ===
<speak>hello<break time="1000ms"/>goodbye</speak>
<speak>hello<break time="1s"/>goodbye</speak>
)
}
}

0 comments on commit 1ea094b

Please sign in to comment.