diff --git a/lib/generators/data_checks/templates/initializer.rb.tt b/lib/generators/data_checks/templates/initializer.rb.tt index f9d1b6d..687a80d 100644 --- a/lib/generators/data_checks/templates/initializer.rb.tt +++ b/lib/generators/data_checks/templates/initializer.rb.tt @@ -12,7 +12,8 @@ DataChecks.configure do # ==> Configure checks # - # Available checks are :ensure_no, :ensure_any, :ensure_more, and :ensure_less. + # Available checks are :ensure_no, :ensure_any, :ensure_more, :ensure_less, + # and :ensure_equal. # # ensure_no :users_without_emails do # User.where(email: nil).count diff --git a/test/install_generator_test.rb b/test/install_generator_test.rb index 709f122..5cdb898 100644 --- a/test/install_generator_test.rb +++ b/test/install_generator_test.rb @@ -22,6 +22,14 @@ def test_creates_initializer_file assert_file("config/initializers/data_checks.rb") do |content| assert_includes content, "DataChecks.configure do" + expected_dsl_methods = DataChecks::Config.new + .public_methods + .select { |dsl_method_name| dsl_method_name.to_s.start_with?("ensure_") } + .map(&:to_s) + + expected_dsl_methods.each do |dsl_method_name| + assert_includes content, dsl_method_name + end end end end