Class: SetupTest
- Inherits:
-
Erebus::NamedGenerator
- Object
- Thor::Group
- Erebus::Generator
- Erebus::NamedGenerator
- SetupTest
- Includes:
- Erebus::Actions::ZipFile
- Defined in:
- lib/erebus/generators/setup_test.rb
Class Method Summary collapse
Instance Method Summary collapse
Methods included from Erebus::Actions::ZipFile
Methods inherited from Erebus::Generator
Class Method Details
.source_root ⇒ Object
8 9 10 |
# File 'lib/erebus/generators/setup_test.rb', line 8 def self.source_root File.dirname(__FILE__) end |
Instance Method Details
#append_rake_command ⇒ Object
24 25 26 27 28 29 |
# File 'lib/erebus/generators/setup_test.rb', line 24 def append_rake_command if !File.exist?("#{class_name}/test.rake") template "templates/rake_test.erb", "#{class_name}/test.rake" append_file "#{class_name}/Rakefile", "\nimport \"test.rake\"" end end |
#create_test_runner ⇒ Object
20 21 22 |
# File 'lib/erebus/generators/setup_test.rb', line 20 def create_test_runner template "templates/spec_runner.cpp.erb", "#{class_name}/spec/runner.cpp" end |
#get_test_framework ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/erebus/generators/setup_test.rb', line 12 def get_test_framework #SetupTest.validate_project get "https://github.com/joakimkarlsson/igloo/archive/master.zip", "#{class_name}/lib/igloo.zip" say_status :extracting, "#{class_name}/lib/igloo.zip" extract "#{class_name}/lib/igloo.zip", "#{class_name}/lib" remove_file "#{class_name}/lib/igloo.zip" end |