-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
KBP-121 #time 1h implement cli helper specs
- Loading branch information
İsmail Akbudak
committed
Sep 11, 2017
1 parent
e87c3d5
commit 95f9a5c
Showing
6 changed files
with
85 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
Description: | ||
Cybele is a Rails template with Lab2023 standard | ||
defaults. | ||
|
||
For full details check our GitHub project: | ||
https://github.com/kebab-project/cybele | ||
|
||
Example: | ||
cybele ~/Workplace/blog | ||
|
||
This generates a Rails installation in ~/Workplace/blog configured | ||
with our preferred defaults. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# frozen_string_literal: true | ||
|
||
require 'spec_helper' | ||
|
||
RSpec.describe 'Command line help output' do | ||
let(:help_text) { cybele_help_command } | ||
|
||
it 'does not contain the default rails usage statement' do | ||
expect(help_text).not_to include('rails new APP_PATH [options]') | ||
end | ||
|
||
it 'provides the correct usage statement for cybele' do | ||
expect(help_text).to include <<~EOH | ||
Usage: | ||
cybele APP_PATH [options] | ||
EOH | ||
end | ||
|
||
it 'does not contain the default rails group' do | ||
expect(help_text).not_to include('Rails options:') | ||
end | ||
|
||
it 'provides help and version usage within the cybele group' do | ||
expect(help_text).to include <<~EOH | ||
Cybele options: | ||
-h, [--help], [--no-help] # Show cybele help message and quit | ||
-v, [--version], [--no-version] # Show cybele version number and quit | ||
[--skip-ask], [--no-skip-ask] # Skip ask for cybele options. Default: skip | ||
# Default: true | ||
[--skip-create-database], [--no-skip-create-database] # Skip create database. Default: don't skip | ||
[--skip-sidekiq], [--no-skip-sidekiq] # Skip sidekiq integration. Default: don't skip | ||
EOH | ||
end | ||
|
||
it 'does not show the default extended rails help section' do | ||
expect(help_text).not_to include('Create cybele files for app generator.') | ||
end | ||
|
||
it 'contains the usage statement from the cybele gem' do | ||
expect(help_text).to include IO.read(usage_file) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters