spec/spec_helper.rb in optionsful-0.4.0 vs spec/spec_helper.rb in optionsful-0.4.1
- old
+ new
@@ -78,6 +78,24 @@
end
def rails_app
app = FakeApp.initialize!
app
- end
\ No newline at end of file
+ end
+
+ def configuration
+ configurator = Baurets::Optionsful::Configurator.new
+ configuration = configurator.configure!
+ configuration
+ end
+
+ def delete_configuration_file
+ FileUtils.rm [File.join(Rails.root, 'config', 'optionsful.yml')] if File.exist? File.join(Rails.root, 'config', 'optionsful.yml')
+ end
+
+ def copy_configuration_file(name)
+ FileUtils.cp File.join(Rails.root, 'samples', name), File.join(Rails.root, 'config', 'optionsful.yml')
+ end
+
+ def simulate_rake_yml_task
+ FileUtils.cp File.join(Rails.root, 'samples', 'optionsful.yml'), File.join(Rails.root, 'config', 'optionsful.yml')
+ end