Skip to content
Snippets Groups Projects
Select Git revision
  • 4092c7c2d5544b8ceaba0893dd98c22d75b86a3c
  • master default
  • remove-matefun-graf-from-angular
  • pg-moodle-integration-main
  • feature/discontinuidades
  • feature/i18n-with-routes
  • develop
  • feature/functions-information
  • feature/editor-improvements
  • feature/add-in18-frontend
  • feature/integration-graph-2d-3d
  • feature/3DComponentInitialization
  • graficas-componente
  • feature/codeMatchBrackets
  • v2.0
  • v1.0
16 results

confirm.component.ts

Blame
  • Forked from matefun / Frontend
    Source project has a limited visibility.
    Guardfile 2.42 KiB
    require 'active_support/core_ext/string'
    # Defines the matching rules for Guard.
    
    # rubocop:disable Metrics/BlockLength
    guard :minitest, spring: 'bin/rails test', all_on_start: false do
      watch(%r{^test/(.*)/?(.*)_test\.rb$})
      watch('test/test_helper.rb') { 'test' }
      watch('config/routes.rb') { interface_tests }
      watch(%r{app/views/layouts/*}) { interface_tests }
      watch(%r{^app/models/(.*?)\.rb$}) do |matches|
        ["test/models/#{matches[1]}_test.rb",
         'test/integration/microposts_interface_test.rb']
      end
      watch(%r{^test/fixtures/(.*?)\.yml$}) do |matches|
        "test/models/#{matches[1].singularize}_test.rb"
      end
      watch(%r{^app/mailers/(.*?)\.rb$}) do |matches|
        "test/mailers/#{matches[1]}_test.rb"
      end
      watch(%r{^app/views/(.*)_mailer/.*$}) do |matches|
        "test/mailers/#{matches[1]}_mailer_test.rb"
      end
      watch(%r{^app/controllers/(.*?)_controller\.rb$}) do |matches|
        resource_tests(matches[1])
      end
      watch(%r{^app/views/([^/]*?)/.*\.html\.erb$}) do |matches|
        ["test/controllers/#{matches[1]}_controller_test.rb"] +
          integration_tests(matches[1])
      end
      watch(%r{^app/helpers/(.*?)_helper\.rb$}) do |matches|
        integration_tests(matches[1])
      end
      watch('app/views/layouts/application.html.erb') do
        'test/integration/site_layout_test.rb'
      end
      watch('app/helpers/sessions_helper.rb') do
        integration_tests << 'test/helpers/sessions_helper_test.rb'
      end
      watch('app/controllers/sessions_controller.rb') do
        ['test/controllers/sessions_controller_test.rb',
         'test/integration/users_login_test.rb']
      end
      watch('app/controllers/account_activations_controller.rb') do
        'test/integration/users_signup_test.rb'
      end
      watch(%r{app/views/users/*}) do
        resource_tests('users') +
          ['test/integration/microposts_interface_test.rb']
      end
    end
    # rubocop:enable Metrics/BlockLength
    
    # Returns the integration tests corresponding to the given resource.
    def integration_tests(resource = :all)
      if resource == :all
        Dir['test/integration/*']
      else
        Dir["test/integration/#{resource}_*.rb"]
      end
    end
    
    # Returns all tests that hit the interface.
    def interface_tests
      integration_tests << 'test/controllers'
    end
    
    # Returns the controller tests corresponding to the given resource.
    def controller_test(resource)
      "test/controllers/#{resource}_controller_test.rb"
    end
    
    # Returns all tests for the given resource.
    def resource_tests(resource)
      integration_tests(resource) << controller_test(resource)
    end