Repository navigation
CI: test rabl in freshly generated Rails 7.2, Rails 8.1 and Sinatra apps; remove fixtures/ - #811
Merged
Merged
Conversation
…in CI The checked-in fixture apps (Rails 2 to 6, Rails 5 API, Sinatra and Padrino 0.10 under fixtures/, with their tests in test/integration) were never run by CI and no longer install. A new "apps" job in ci.yml now generates each app with `rails new --minimal` (or a plain Sinatra app), adds rabl from the checkout, copies in the shared models, views and tests from test/apps, and runs them: test/apps/build_and_test.sh does the same locally. The tests cover what the fixture tests did on Rails 6: collections with extends, child, glue, conditional nodes and children, partials of objects and collections, locals, root names, app and view helpers, escape_all_output, Rabl.render with a view scope, ERB views rendering rabl, a custom MIME type, XML, an ActionController::API controller, template caching and cache_all_output. Cached output is checked by behaviour (a second request is served from the cache) instead of hard-coded digests. The Rakefile's fixture tasks, test/silence.rb (used only by the fixtures), the unused rack-test dependency and the fixtures' .gitignore entry go too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DCpeuxhYEgymbSMcsBXyZd
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The checked-in
fixtures/apps (Rails 2 to 6, Rails 5 API, Sinatra and Padrino 0.10.7) andtest/integrationno longer install, and CI doesn't run them.Change
A new
appsjob in.github/workflows/ci.ymlfor Rails 7.2 (Ruby 3.1), Rails 8.1 (Ruby 3.4) and Sinatra (Ruby 3.4). Its actions are pinned to the same SHAs asrelease.yml, and it runs withcontents: read.test/apps/build_and_test.shgenerates the app (rails new --minimal, or an empty Sinatra app), copies intest/apps/sharedplus the app's own files, adds rabl from the checkout withpath:, and runs the app's tests.Ported behaviours:
extends, custom attribute names,child(and nested),glue, conditional child and node,object =>, partials with and without locals, app and Rails view helpers;escape_all_output,Rabl.renderwith a view-context scope;ActionController::APIcontroller;cache_all_output.Sinatra gets everything except HTML, MIME, XML and API.
Removed:
fixtures/andtest/integration/;test/silence.rb;test:clean,test:setup,test:fixturesandtest:fulltasks;rack-testfrom the Gemfile.The gem's file list is unchanged, and
rake teststill runstest/*_test.rb.Dropped deliberately:
Verification
cache_all_outputoff, the railtie's API-rendering include removed, the source format forced to JSON, escaping removed), the matching app tests fail. Unmutated, all pass.Not verified
Conflicts with the ActiveSupport-floor PR in
Gemfileonly.Generated by Claude Code