Class: TestData::Configurators::Initializer
- Inherits:
-
Object
- Object
- TestData::Configurators::Initializer
- Defined in:
- lib/test_data/configurators/initializer.rb
Instance Method Summary collapse
- #configure ⇒ Object
-
#initialize ⇒ Initializer
constructor
A new instance of Initializer.
- #verify ⇒ Object
Constructor Details
#initialize ⇒ Initializer
Returns a new instance of Initializer.
4 5 6 7 |
# File 'lib/test_data/configurators/initializer.rb', line 4 def initialize @generator = InitializerGenerator.new @config = TestData.config end |
Instance Method Details
#configure ⇒ Object
21 22 23 |
# File 'lib/test_data/configurators/initializer.rb', line 21 def configure @generator.call end |
#verify ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/test_data/configurators/initializer.rb', line 9 def verify path = "config/initializers/test_data.rb" pathname = Pathname.new("#{@config.pwd}/#{path}") if pathname.readable? ConfigurationVerification.new(looks_good?: true) else ConfigurationVerification.new(problems: [ "'#{path}' is not readable" ]) end end |