Class: Aruba::Initializer

Inherits:
Object
  • Object
show all
Defined in:
lib/aruba/initializer.rb

Overview

The whole initializer

This one uses the specific initializers to generate the needed files.

Instance Method Summary collapse

Constructor Details

#initializeInitializer

Returns a new instance of Initializer.



198
199
200
201
202
203
204
# File 'lib/aruba/initializer.rb', line 198

def initialize
  @initializers = []
  @initializers << Initializers::RSpecInitializer
  @initializers << Initializers::CucumberInitializer
  @initializers << Initializers::MiniTestInitializer
  @initializers << Initializers::FailingInitializer
end

Instance Method Details

#call(test_framework) ⇒ Object

Create files etc.



207
208
209
210
211
212
213
214
215
216
# File 'lib/aruba/initializer.rb', line 207

def call(test_framework)
  begin
    initializers.find { |i| i.match? test_framework }.start [], {}
  rescue ArgumentError => e
    warn e.message
    exit 0
  end

  Initializers::CommonInitializer.start [], {}
end