Skip to content

Add Rails request specs with ActiveRecord and fixtures#29

Merged
Nitemaeric merged 3 commits intomainfrom
rails-test-fixtures
Apr 4, 2026
Merged

Add Rails request specs with ActiveRecord and fixtures#29
Nitemaeric merged 3 commits intomainfrom
rails-test-fixtures

Conversation

@Nitemaeric
Copy link
Copy Markdown
Contributor

@Nitemaeric Nitemaeric commented Apr 4, 2026

Summary

  • Replace the standalone integration dummy (plain Ruby objects with hardcoded data) with a proper Rails dummy app backed by ActiveRecord and an in-memory SQLite database
  • Test data managed through Rails fixtures instead of hardcoded class methods
  • Fix Rendering#render to handle Rails' send_data, which passes a positional Hash to render rather than keyword arguments
  • Add request specs covering serialization, namespace lookup, association rendering, cross-namespace serializers, and send_data compatibility

Test plan

  • All 36 specs pass (bundle exec rspec)
  • 99.22% line coverage
  • No rubocop offenses
  • CI passes across Ruby 3.2, 3.3, 3.4, and ruby-head

🤖 Generated with Claude Code

Nitemaeric and others added 3 commits April 4, 2026 17:30
Replace the standalone integration dummy (plain Ruby objects with
hardcoded data) with a proper Rails dummy app backed by ActiveRecord
and SQLite in-memory database. Test data is now managed through Rails
fixtures.

This also fixes the render override to handle Rails' send_data which
passes a positional Hash to render rather than keyword arguments.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Nitemaeric Nitemaeric merged commit 0606be7 into main Apr 4, 2026
7 checks passed
@Nitemaeric Nitemaeric deleted the rails-test-fixtures branch April 4, 2026 16:46
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.

1 participant