/**
  * Execute the console command.
  * @return mixed
  * @throws MissingEdibleFileException
  */
 public function handle()
 {
     if (!file_exists(base_path('edible.yaml'))) {
         throw new MissingEdibleFileException();
     }
     $writer = ContentWriterFactory::makeWriter();
     $this->showChanges($writer->additions(), $writer->deletions());
     if ($this->confirm('Are you sure you want to continue? [y|N]')) {
         $writer->setContentStructure();
         $this->info('All done.');
     } else {
         $this->warn('aborted');
     }
 }
 /**
  *@test
  */
 public function it_produces_a_valid_content_writer_instance()
 {
     $writer = ContentWriterFactory::makeWriter();
     $this->assertInstanceOf(ContentWriter::class, $writer);
 }