Class: Hanami::CLI::Commands::New::TestFramework Private
- Inherits:
-
Object
- Object
- Hanami::CLI::Commands::New::TestFramework
- Defined in:
- lib/hanami/cli/commands/new.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Constant Summary collapse
- RSPEC =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
'rspec'.freeze
- MINITEST =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
'minitest'.freeze
- VALID_FRAMEWORKS =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
[RSPEC, MINITEST].freeze
Instance Attribute Summary collapse
- #framework ⇒ Object readonly private
Instance Method Summary collapse
-
#initialize(hanamirc, framework) ⇒ TestFramework
constructor
private
A new instance of TestFramework.
- #minitest? ⇒ Boolean private
- #rspec? ⇒ Boolean private
Constructor Details
#initialize(hanamirc, framework) ⇒ TestFramework
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of TestFramework.
157 158 159 160 |
# File 'lib/hanami/cli/commands/new.rb', line 157 def initialize(hanamirc, framework) @framework = (framework || hanamirc..fetch(:test)) assert_framework! end |
Instance Attribute Details
#framework ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
153 154 155 |
# File 'lib/hanami/cli/commands/new.rb', line 153 def framework @framework end |
Instance Method Details
#minitest? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
170 171 172 |
# File 'lib/hanami/cli/commands/new.rb', line 170 def minitest? framework == MINITEST end |
#rspec? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
164 165 166 |
# File 'lib/hanami/cli/commands/new.rb', line 164 def rspec? framework == RSPEC end |