Class: TestData::Configurators::EnvironmentFile
- Inherits:
-
Object
- Object
- TestData::Configurators::EnvironmentFile
- Defined in:
- lib/test_data/configurators/environment_file.rb
Instance Method Summary collapse
- #configure ⇒ Object
-
#initialize ⇒ EnvironmentFile
constructor
A new instance of EnvironmentFile.
- #verify ⇒ Object
Constructor Details
#initialize ⇒ EnvironmentFile
Returns a new instance of EnvironmentFile.
4 5 6 7 |
# File 'lib/test_data/configurators/environment_file.rb', line 4 def initialize @generator = EnvironmentFileGenerator.new @config = TestData.config end |
Instance Method Details
#configure ⇒ Object
21 22 23 |
# File 'lib/test_data/configurators/environment_file.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/environment_file.rb', line 9 def verify path = "config/environments/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 |