Class: RSpec::Manumit::ProjectInitializer
- Inherits:
-
Object
- Object
- RSpec::Manumit::ProjectInitializer
- Defined in:
- lib/rspec/manumit/project_initializer.rb
Constant Summary collapse
- MANUMIT_HELPER_FILE =
'spec/manumit_helper.rb'
- FEATURE_SPEC_FILE =
'spec/features/homepage_spec.rb'
Instance Attribute Summary collapse
-
#destination ⇒ Object
readonly
Returns the value of attribute destination.
-
#stream ⇒ Object
readonly
Returns the value of attribute stream.
-
#template_path ⇒ Object
readonly
Returns the value of attribute template_path.
Instance Method Summary collapse
-
#initialize ⇒ ProjectInitializer
constructor
A new instance of ProjectInitializer.
- #run ⇒ Object
Constructor Details
#initialize ⇒ ProjectInitializer
Returns a new instance of ProjectInitializer.
10 11 12 13 14 |
# File 'lib/rspec/manumit/project_initializer.rb', line 10 def initialize @destination = Dir.getwd @stream = $stdout @template_path = File.('../project_initializer', __FILE__) end |
Instance Attribute Details
#destination ⇒ Object (readonly)
Returns the value of attribute destination.
5 6 7 |
# File 'lib/rspec/manumit/project_initializer.rb', line 5 def destination @destination end |
#stream ⇒ Object (readonly)
Returns the value of attribute stream.
5 6 7 |
# File 'lib/rspec/manumit/project_initializer.rb', line 5 def stream @stream end |
#template_path ⇒ Object (readonly)
Returns the value of attribute template_path.
5 6 7 |
# File 'lib/rspec/manumit/project_initializer.rb', line 5 def template_path @template_path end |
Instance Method Details
#run ⇒ Object
16 17 18 19 20 |
# File 'lib/rspec/manumit/project_initializer.rb', line 16 def run system('rspec --init') copy_template MANUMIT_HELPER_FILE copy_template FEATURE_SPEC_FILE end |