Sha256: 9cfa21b936ef42b8ffe398f3780047df58a73c12eb7eb1244bdbbf325e6ddec1
Contents?: true
Size: 1.41 KB
Versions: 1
Compression:
Stored size: 1.41 KB
Contents
Feature: Running from the Command Line Scripted comes with a executable to run commands. This requires you to have a configuration file somewhere. The default configuration file is `scripted.rb`, allowing you to run scripted without passing any commands. $ scripted If you want to store your configuration file somewhere else, you can specify it with the `-r` or `--require` option: $ scripted -r foo.rb To get more information, about the options, run: $ scripted --help Scenario: Running some commands Given a file named "scripted.rb" with: """ run "echo command 1" run "echo command 2" """ When I run `scripted` Then it should pass And the output should contain "command 1" And the output should contain "command 2" Scenario: By specifying another file Given a file named "something_else.rb" with: """ run "echo 1" run "echo 2" """ When I run `scripted -r something_else.rb` Then it should pass Scenario: With a non existing file When I run `scripted -r nope.rb` Then it should fail with regexp: """ ^No such file -- .*nope.rb$ """ Scenario: Without `scripted.rb` When I run `scripted` Then it should fail with regexp: """ ^No such file -- .*scripted.rb$ """ And the output should contain: """ Either create a file called 'scripted.rb', or specify another file to load """
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
scripted-0.0.1 | features/running_from_command_line.feature |