Skip to content
This repository has been archived by the owner on Mar 2, 2018. It is now read-only.

Commit

Permalink
a spec for loop
Browse files Browse the repository at this point in the history
  • Loading branch information
tmtk75 committed Nov 15, 2012
1 parent f71c85b commit c9cb524
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions spec/SequenceDiagramBuilderSpec.coffee
Expand Up @@ -196,6 +196,12 @@ describe "SequenceDiagramBuilder", ->
expect(a).toBe @builder

describe "loop", ->
it "returns the child", ->
@builder.build """
@found "open", ->
this.from_loop = @loop -> @message "write", "File"
"""
expect(@builder.from_loop.find(".message .name").text()).toBe "write"

describe "alt", ->

Expand All @@ -221,8 +227,7 @@ describe "SequenceDiagramBuilder", ->
@diagram = @builder.build """
@found "open", ->
@alt {
"[found]": -> @loop ->
@message "write", "File"
"[found]": -> @loop -> @message "write", "File"
"[missing]": -> @message "close", "File"
}
"""
Expand Down

0 comments on commit c9cb524

Please sign in to comment.