Sha256: 8d6f2c6cd12a254f2459f7e367a2cd4858e0a648f4e5ac579588fc6ac707c182

Contents?: true

Size: 748 Bytes

Versions: 1

Compression:

Stored size: 748 Bytes

Contents

Feature: Advanced scripting

As a My script writer
I want to nest tasks inside of questions
So I can respond dynamically to the user's needs

Scenario: Nesting questions
Given a file named "yes.template" with:
  """
  The user picked yes
  """
And a file named "script.rb" with:
  """
  ask "Are you sure you would like to apply this script?"
  yes do
    folder "foo"
    file "foo.txt" => "yes.template"
    ask "Would you like to create bar.txt?"
    yes do
      file "bar.txt" => "yes.template"
    end
  end
  """
When I run "../../bin/my script.rb" interactively
And I type "y"
And I type "y"
And the program completes
Then the file "foo.txt" should contain "The user picked yes"
Then the file "bar.txt" should contain "The user picked yes"

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
my-0.3.0 features/advanced.feature