Sha256: 8b100fef750c5bba9356f5c0e4376e323c857a6b56731cbdc73bb2c04a7c2004

Contents?: true

Size: 933 Bytes

Versions: 7

Compression:

Stored size: 933 Bytes

Contents

require 'rails/generators'

class TestAppGenerator < Rails::Generators::Base
  source_root File.expand_path("../../../../support", __FILE__)

  def copy_test_fixtures
    copy_file "app/models/generic_content.rb"

    # Download controller
    copy_file "app/controllers/downloads_controller.rb"

    copy_file "spec/fixtures/hydrangea_fixture_mods_article1.foxml.xml" 

    # For testing Hydra::SubmissionWorkflow
    copy_file "spec/fixtures/hydra_test_generic_content.foxml.xml"
  end

  def copy_rspec_rake_task
    copy_file "lib/tasks/rspec.rake"
  end

  def run_blacklight_generator
    say_status("warning", "GENERATING BL", :yellow)       

    generate 'blacklight:install', '--devise'
  end

  def run_hydra_head_generator
    say_status("warning", "GENERATING HH", :yellow)       

    generate 'hydra:head', '-f --skip-rspec'
  end

  def remove_generated_user_spec
    remove_file 'spec/models/user_spec.rb'
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
hydra-core-8.2.0 spec/support/lib/generators/test_app_generator.rb
hydra-core-8.1.0 spec/support/lib/generators/test_app_generator.rb
hydra-core-8.0.0 spec/support/lib/generators/test_app_generator.rb
hydra-core-8.0.0.beta1 spec/support/lib/generators/test_app_generator.rb
hydra-core-7.2.2 spec/support/lib/generators/test_app_generator.rb
hydra-core-7.2.1 spec/support/lib/generators/test_app_generator.rb
hydra-core-7.2.0 spec/support/lib/generators/test_app_generator.rb