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.


192
193
194
195
196
197
198
# File 'lib/aruba/initializer.rb', line 192

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.


201
202
203
204
205
206
207
208
209
210
# File 'lib/aruba/initializer.rb', line 201

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

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