Sha256: 015543a6edb66a861d23c99c483b74ad3eae54264933da3091bda76c8332acd2
Contents?: true
Size: 1.84 KB
Versions: 1
Compression:
Stored size: 1.84 KB
Contents
Feature: Ensuring README examples As a My project maintainer I want to ensure my Sinatra example works So I that I avoid humiliation Background: Given a file named "script.rb" with: """ # Sinatra My Script file "app.rb" => "http://pastie.org/944315.txt" file "config.ru" => "http://pastie.org/994640.txt" ask "Will you be using external views?" yes do folder "views" file "views/index.html" => "http://pastie.org/944311.txt" end ask "Will you be using an external stylesheet?" yes do folder "views" file "views/style.sass" => "http://pastie.org/944313.txt" end """ Scenario: Answering yes and yes When I run "../../bin/my script.rb" interactively And I type "y" And I type "y" And the program completes Then the following files should exist: | app.rb | | config.ru | | views/index.html | | views/style.sass | Scenario: Answering yes and no When I run "../../bin/my script.rb" interactively And I type "y" And I type "n" And the program completes Then the following files should exist: | app.rb | | config.ru | | views/index.html | And the following files should not exist: | views/style.sass | Scenario: Answering no and yes When I run "../../bin/my script.rb" interactively And I type "n" And I type "y" And the program completes Then the following files should exist: | app.rb | | config.ru | | views/style.sass | And the following files should not exist: | views/index.html | Scenario: Answering no and no When I run "../../bin/my script.rb" interactively And I type "n" And I type "n" And the program completes Then the following files should exist: | app.rb | | config.ru | And the following folders should not exist: | views |
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
my-0.3.0 | features/sinatra.feature |