rails/railties
Jonathan Hefner 0b02dce15f Fix generator tests on arm64 platforms
Follow-up to #47516 / #47492.

When running generator tests on `arm64` platforms, there is an extra
`lock --add-platform` command in `@bundle_commands` which causes
`assert_match %r"^exec rails ...", @bundle_commands[2]` to fail.

However, `run_generator_using_prerelease` isn't really concerned with
`lock --add-platform` commands; it is only concerned with the `install`
and `exec rails` commands, and the contents of the `Gemfile` when those
commands were executed.

Therefore, this commit removes `lock --add-platform` command-related
assertions from `run_generator_using_prerelease` and puts them into a
dedicated `test_generation_runs_bundle_lock_for_linux` test.  This
approach makes `run_generator_using_prerelease` less brittle.  This
change also fixes a technically incorrect assertion wherein the contents
of the `Gemfile` during the `lock --add-platform` command was checked
instead of the contents during the `exec rails` command.

Fixes #50168.

Co-authored-by: zzak <zzakscott@gmail.com>
2023-11-25 16:42:10 -06:00
..
bin Adding frozen_string_literal pragma to Railties. 2017-08-14 19:08:09 +02:00
exe Adding frozen_string_literal pragma to Railties. 2017-08-14 19:08:09 +02:00
lib Remove deprecated primitive serializer for BigDecimal arguments 2023-11-22 22:13:03 +00:00
test Fix generator tests on arm64 platforms 2023-11-25 16:42:10 -06:00
.gitignore Install JavaScript packages before run test 2019-02-11 09:58:08 +09:00
CHANGELOG.md Fix running db:system:change with no Dockerfile 2023-11-09 11:26:51 -05:00
MIT-LICENSE Remove Copyright years (#47467) 2023-02-23 11:38:16 +01:00
railties.gemspec Fix chmod race condition when generating key 2023-05-11 16:29:26 -04:00
Rakefile Require shellwords where it is used 2022-01-06 00:19:11 +00:00
RDOC_MAIN.md Fix list item numbering on API docs main page [ci-skip] 2023-08-17 16:22:16 -05:00
README.rdoc 🔗 Remove RDoc auto-link from Rails module everywhere 2023-06-23 10:49:30 +09:00

= Railties -- Gluing the Engine to the \Rails

Railties is responsible for gluing all frameworks together. Overall, it:

* handles the bootstrapping process for a \Rails application;

* manages the +rails+ command line interface;

* and provides the \Rails generators core.

== Download

The latest version of Railties can be installed with RubyGems:

* gem install railties

Source code can be downloaded as part of the \Rails project on GitHub

* https://github.com/rails/rails/tree/main/railties

== License

Railties is released under the MIT license:

* https://opensource.org/licenses/MIT

== Support

API documentation is at

* https://api.rubyonrails.org

Bug reports can be filed for the Ruby on \Rails project here:

* https://github.com/rails/rails/issues

Feature requests should be discussed on the rails-core mailing list here:

* https://discuss.rubyonrails.org/c/rubyonrails-core