Skip to content

Commit

Permalink
Remove missing factory spec and all blank factories
Browse files Browse the repository at this point in the history
Enhance FactoryGirl.create and FactoryGirl.build to super if the factory
exists, otherwise call create or new directly.

- No longer need to create an empty factory every time a new class is created
- No longer need factories for things that shouldn't be factories (SchemaMigrations and join tables)
- Many of the factories were incorrect to begin with (not inheriting from the base factory)
  • Loading branch information
bdunne committed Feb 9, 2018
1 parent 76b5084 commit 1aebba0
Show file tree
Hide file tree
Showing 218 changed files with 31 additions and 706 deletions.
3 changes: 0 additions & 3 deletions spec/factories/advanced_setting.rb

This file was deleted.

3 changes: 0 additions & 3 deletions spec/factories/application_record.rb

This file was deleted.

4 changes: 0 additions & 4 deletions spec/factories/asset_details.rb

This file was deleted.

3 changes: 0 additions & 3 deletions spec/factories/asset_tag_import.rb

This file was deleted.

3 changes: 0 additions & 3 deletions spec/factories/audit_event.rb

This file was deleted.

3 changes: 0 additions & 3 deletions spec/factories/auth_private_key.rb

This file was deleted.

3 changes: 0 additions & 3 deletions spec/factories/auth_token.rb

This file was deleted.

3 changes: 0 additions & 3 deletions spec/factories/auth_userid_password.rb

This file was deleted.

3 changes: 0 additions & 3 deletions spec/factories/authentication_configuration_script_base.rb

This file was deleted.

3 changes: 0 additions & 3 deletions spec/factories/authentication_orchestration_stack.rb

This file was deleted.

3 changes: 0 additions & 3 deletions spec/factories/authentication_rhsm.rb

This file was deleted.

3 changes: 0 additions & 3 deletions spec/factories/authenticator.rb

This file was deleted.

4 changes: 0 additions & 4 deletions spec/factories/binary_blob.rb

This file was deleted.

4 changes: 0 additions & 4 deletions spec/factories/binary_blob_part.rb

This file was deleted.

4 changes: 0 additions & 4 deletions spec/factories/bottleneck_event.rb

This file was deleted.

3 changes: 0 additions & 3 deletions spec/factories/chargeback.rb

This file was deleted.

3 changes: 0 additions & 3 deletions spec/factories/chargeback_container_image.rb

This file was deleted.

3 changes: 0 additions & 3 deletions spec/factories/chargeback_container_project.rb

This file was deleted.

3 changes: 0 additions & 3 deletions spec/factories/chargeback_vm.rb

This file was deleted.

3 changes: 0 additions & 3 deletions spec/factories/classification_import.rb

This file was deleted.

3 changes: 0 additions & 3 deletions spec/factories/cloud_database.rb

This file was deleted.

3 changes: 0 additions & 3 deletions spec/factories/cloud_database_flavor.rb

This file was deleted.

5 changes: 0 additions & 5 deletions spec/factories/cloud_object.rb

This file was deleted.

3 changes: 0 additions & 3 deletions spec/factories/cloud_resource_quota.rb

This file was deleted.

3 changes: 0 additions & 3 deletions spec/factories/cloud_subnet_network_port.rb

This file was deleted.

5 changes: 0 additions & 5 deletions spec/factories/cloud_tenant_flavor.rb

This file was deleted.

3 changes: 0 additions & 3 deletions spec/factories/compute_node.rb

This file was deleted.

4 changes: 0 additions & 4 deletions spec/factories/computer_system.rb

This file was deleted.

3 changes: 0 additions & 3 deletions spec/factories/condition_set.rb

This file was deleted.

1 change: 0 additions & 1 deletion spec/factories/configuration_architecture.rb

This file was deleted.

3 changes: 0 additions & 3 deletions spec/factories/configuration_compute_profile.rb

This file was deleted.

3 changes: 0 additions & 3 deletions spec/factories/configuration_domain.rb

This file was deleted.

3 changes: 0 additions & 3 deletions spec/factories/configuration_environment.rb

This file was deleted.

3 changes: 0 additions & 3 deletions spec/factories/configuration_realm.rb

This file was deleted.

3 changes: 0 additions & 3 deletions spec/factories/configuration_tag.rb

This file was deleted.

3 changes: 0 additions & 3 deletions spec/factories/container_build.rb

This file was deleted.

3 changes: 0 additions & 3 deletions spec/factories/container_build_pod.rb

This file was deleted.

3 changes: 0 additions & 3 deletions spec/factories/container_condition.rb

This file was deleted.

4 changes: 0 additions & 4 deletions spec/factories/container_deployment.rb

This file was deleted.

4 changes: 0 additions & 4 deletions spec/factories/container_deployment_node.rb

This file was deleted.

3 changes: 0 additions & 3 deletions spec/factories/container_env_var.rb

This file was deleted.

3 changes: 0 additions & 3 deletions spec/factories/container_group_performance.rb

This file was deleted.

3 changes: 0 additions & 3 deletions spec/factories/container_groups_container_services.rb

This file was deleted.

3 changes: 0 additions & 3 deletions spec/factories/container_limit.rb

This file was deleted.

3 changes: 0 additions & 3 deletions spec/factories/container_limit_item.rb

This file was deleted.

3 changes: 0 additions & 3 deletions spec/factories/container_node_performance.rb

This file was deleted.

3 changes: 0 additions & 3 deletions spec/factories/container_performance.rb

This file was deleted.

3 changes: 0 additions & 3 deletions spec/factories/container_port_config.rb

This file was deleted.

3 changes: 0 additions & 3 deletions spec/factories/container_project_performance.rb

This file was deleted.

3 changes: 0 additions & 3 deletions spec/factories/container_quota.rb

This file was deleted.

3 changes: 0 additions & 3 deletions spec/factories/container_quota_item.rb

This file was deleted.

3 changes: 0 additions & 3 deletions spec/factories/container_service_port_config.rb

This file was deleted.

5 changes: 1 addition & 4 deletions spec/factories/container_template.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
FactoryGirl.define do
factory :container_template do
end
end
FactoryGirl.define { factory(:container_template) }
4 changes: 0 additions & 4 deletions spec/factories/container_template_parameter.rb

This file was deleted.

3 changes: 0 additions & 3 deletions spec/factories/container_volume_kubernetes.rb

This file was deleted.

3 changes: 0 additions & 3 deletions spec/factories/custom_event.rb

This file was deleted.

4 changes: 0 additions & 4 deletions spec/factories/customization_script.rb

This file was deleted.

3 changes: 0 additions & 3 deletions spec/factories/customization_script_medium.rb

This file was deleted.

3 changes: 0 additions & 3 deletions spec/factories/customization_script_ptable.rb

This file was deleted.

3 changes: 0 additions & 3 deletions spec/factories/dialog_field_association.rb

This file was deleted.

3 changes: 0 additions & 3 deletions spec/factories/dialog_field_association_validator.rb

This file was deleted.

3 changes: 0 additions & 3 deletions spec/factories/dialog_field_check_box.rb

This file was deleted.

3 changes: 0 additions & 3 deletions spec/factories/dialog_field_date_control.rb

This file was deleted.

3 changes: 0 additions & 3 deletions spec/factories/dialog_field_date_time_control.rb

This file was deleted.

3 changes: 0 additions & 3 deletions spec/factories/dialog_field_importer.rb

This file was deleted.

3 changes: 0 additions & 3 deletions spec/factories/dialog_field_radio_button.rb

This file was deleted.

3 changes: 0 additions & 3 deletions spec/factories/dialog_field_serializer.rb

This file was deleted.

3 changes: 0 additions & 3 deletions spec/factories/dialog_field_text_area_box.rb

This file was deleted.

3 changes: 0 additions & 3 deletions spec/factories/dialog_group_serializer.rb

This file was deleted.

3 changes: 0 additions & 3 deletions spec/factories/dialog_import_validator.rb

This file was deleted.

3 changes: 0 additions & 3 deletions spec/factories/dialog_serializer.rb

This file was deleted.

3 changes: 0 additions & 3 deletions spec/factories/dialog_tab_serializer.rb

This file was deleted.

3 changes: 0 additions & 3 deletions spec/factories/dialog_yaml_serializer.rb

This file was deleted.

3 changes: 0 additions & 3 deletions spec/factories/dictionary.rb

This file was deleted.

4 changes: 0 additions & 4 deletions spec/factories/disk.rb

This file was deleted.

4 changes: 0 additions & 4 deletions spec/factories/drift_state.rb

This file was deleted.

3 changes: 0 additions & 3 deletions spec/factories/dynamic_dialog_field_value_processor.rb

This file was deleted.

3 changes: 0 additions & 3 deletions spec/factories/ems_cluster_performance.rb

This file was deleted.

4 changes: 0 additions & 4 deletions spec/factories/ems_event.rb

This file was deleted.

3 changes: 0 additions & 3 deletions spec/factories/ems_refresh.rb

This file was deleted.

3 changes: 0 additions & 3 deletions spec/factories/event_log.rb

This file was deleted.

3 changes: 0 additions & 3 deletions spec/factories/event_stream.rb

This file was deleted.

3 changes: 0 additions & 3 deletions spec/factories/ext_management_system_performance.rb

This file was deleted.

3 changes: 0 additions & 3 deletions spec/factories/file_depot_ftp_anonymous.rb

This file was deleted.

3 changes: 0 additions & 3 deletions spec/factories/file_depot_nfs.rb

This file was deleted.

3 changes: 0 additions & 3 deletions spec/factories/file_depot_smb.rb

This file was deleted.

3 changes: 1 addition & 2 deletions spec/factories/firewall_rule.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
FactoryGirl.define do
factory :firewall_rule do
end
factory :firewall_rule
end
4 changes: 0 additions & 4 deletions spec/factories/firmware.rb

This file was deleted.

4 changes: 0 additions & 4 deletions spec/factories/guest_application.rb

This file was deleted.

3 changes: 0 additions & 3 deletions spec/factories/host_aggregate_host.rb

This file was deleted.

3 changes: 0 additions & 3 deletions spec/factories/host_metric.rb

This file was deleted.

3 changes: 0 additions & 3 deletions spec/factories/host_performance.rb

This file was deleted.

3 changes: 0 additions & 3 deletions spec/factories/host_storage.rb

This file was deleted.

3 changes: 0 additions & 3 deletions spec/factories/host_switch.rb

This file was deleted.

Loading

0 comments on commit 1aebba0

Please sign in to comment.