Logo: Relish

  1. Sign in

Project: Working-man

WorkingMan actually works

In order to make it easy to start and stop work each day
I want to have WorkingMan automatically open and close my apps
So that I can be lazy

Background
Given
a mocked home directory
Scenarios
App just runs
When
I get help for "working_man"
Then
the exit status should be 0
And
the output should contain "Commands:"
Prints the version number
When
I run working_man version
Then
the output should print the version
And
the exit status should be 0
Prints the version number when using "-v"
When
I run working_man -v
Then
the output should print the version
And
the exit status should be 0
Prints the version number when using "--version"
When
I run working_man --version
Then
the output should print the version
And
the exit status should be 0
Start work successfully with app and url
Given
a mocked home directory
And
a file named "~/.working_man.yml" with:
apps:
  - 'Twitter'
urls:
  - 'http://www.google.com'
And
I run working_man start
Then
the output should contain "Work hard today"
And
the exit status should be 0
Start work successfully specifying a config file
Given
a file named "~/dotfiles/working_man_config.yml" with:
apps:
  - 'Twitter'
urls:
  - 'http://www.google.com'
When
I run working_man start -f ~/dotfiles/working_man_config.yml
Then
the output should contain "Work hard today"
And
the exit status should be 0
Start work unsuccessfully without any apps
Given
a file named "~/.working_man.yml" with:
apps:
urls:
  - 'http://www.google.com'
And
I run working_man start
Then
the output should contain "No applications in configuration"
And
the exit status should be 2
Start work unsuccessfully without a configuration
Given
a file named "~/.working_man.yml" should not exist
When
I run working_man start
Then
the output should contain "No configuration found."
And
the exit status should be 1
Stop work successfully
Given
a file named "~/.working_man.yml" with:
apps:
  - 'Twitter'
urls:
  - 'http://www.google.com'
When
I run working_man stop
Then
the output should contain "Have a great day!"
And
the exit status should be 0

Last published over 5 years ago by Evan Machnic.