Permalink
Browse files

a spec for loop

  • Loading branch information...
1 parent f71c85b commit c9cb524e7d8869fc26cdec958d5104183af3dbcd @tmtk75 committed Nov 15, 2012
Showing with 7 additions and 2 deletions.
  1. +7 −2 spec/SequenceDiagramBuilderSpec.coffee
@@ -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", ->
@@ -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"
}
"""

0 comments on commit c9cb524

Please sign in to comment.