Sha256: e90adba381ecb235d4b43b610dc4616a86d629fd7a4ab8c59c586fddf6966ec1

Contents?: true

Size: 643 Bytes

Versions: 1

Compression:

Stored size: 643 Bytes

Contents

module CypressOnRails
  class UpdateGenerator < Rails::Generators::Base
    class_option :cypress_folder, type: :string, default: 'spec/cypress'
    source_root File.expand_path('../templates', __FILE__)

    def update_generated_files
      template "config/initializers/cypress_on_rails.rb.erb", "config/initializers/cypress_on_rails.rb"
      template "spec/cypress/cypress_helper.rb.erb", "#{options.cypress_folder}/cypress_helper.rb"
      copy_file "spec/cypress/support/on-rails.js", "#{options.cypress_folder}/support/on-rails.js"
      directory 'spec/cypress/app_commands', "#{options.cypress_folder}/app_commands"
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
cypress-on-rails-1.14.0 lib/generators/cypress_on_rails/update_generator.rb