Use 'include_missing_columns' to simplify mocks
masterBy setting include_missing_columns: true in your mock options, the framework inspects your models and sources to automatically calculate which columns are missing from your mock and infers them. This makes tests easier to maintain but requires that your sources/models are defined and updated in your test/dev environment.
{% set options = {"include_missing_columns": true} %}
{% call dbt_unit_testing.test('customers', 'test name') %}
{% call dbt_unit_testing.mock_ref ('stg_customers', options) %}
select 1 as customer_id
{% endcall %}
{% call dbt_unit_testing.expect() %}
select 1 as customer_id
{% endcall %}
{% endcall %}