Skip to content

Fix generator spec for use_new_acts_as default#801

Merged
crmne merged 1 commit into
crmne:mainfrom
xymbol:fix/generator-use-new-acts-as
Jun 10, 2026
Merged

Fix generator spec for use_new_acts_as default#801
crmne merged 1 commit into
crmne:mainfrom
xymbol:fix/generator-use-new-acts-as

Conversation

@xymbol

@xymbol xymbol commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

What this does

c7e93e26 ("use_new_acts_as defaults to true") flipped the use_new_acts_as config default to true and removed the now-redundant config.use_new_acts_as = true line from the install generator template. It updated configuration_spec.rb and the dummy initializer to match, but missed spec/ruby_llm/generators/install_generator_spec.rb, which still asserts the removed line is present.

As a result CI has been red since c7e93e26 — the failure is only visible on commits that touch lib//spec/, so subsequent docs-only commits left main's status green while the suite was actually broken.

This updates the assertion to expect the line is absent, matching the template and the new default (mirroring the existing config.model_registry_class assertion just below it). The upgrade-to-v1.7 generator still emits the line, so upgrade_generators_spec.rb is left unchanged.

Type of change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation
  • Performance improvement

Scope check

  • I read the Contributing Guide
  • This aligns with RubyLLM's focus on LLM communication
  • This isn't application-specific logic that belongs in user code
  • This benefits most users, not just my specific use case

Required for new features

N/A — bug fix.

Quality check

  • I ran overcommit --install and all hooks pass
  • I tested my changes thoroughly
    • For provider changes: Re-recorded VCR cassettes with bundle exec rake vcr:record[provider_name] (N/A — spec-only change, no provider/HTTP code touched)
    • All tests pass: bundle exec rspec spec/ruby_llm/generators/install_generator_spec.rb -e "creates initializer file" (the generator suite's live-API examples require provider keys and are unrelated to this change)
  • I updated documentation if needed (none needed)
  • I didn't modify auto-generated files manually (models.json, aliases.json)

API changes

  • Breaking change
  • New public methods/classes
  • Changed method signatures
  • No API changes

c7e93e2 made use_new_acts_as default to true and dropped the explicit
line from the install template, but left the spec asserting it, breaking
CI. Assert the line is absent instead.
@crmne crmne merged commit 978d5f2 into crmne:main Jun 10, 2026
21 checks passed
@codecov

codecov Bot commented Jun 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.47%. Comparing base (9c8d740) to head (e7e4954).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #801      +/-   ##
==========================================
- Coverage   88.48%   88.47%   -0.02%     
==========================================
  Files         122      122              
  Lines        5898     5898              
  Branches     1405     1405              
==========================================
- Hits         5219     5218       -1     
- Misses        679      680       +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@xymbol xymbol deleted the fix/generator-use-new-acts-as branch June 10, 2026 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants