diff --git a/Cargo.lock b/Cargo.lock index 54f81ed..da42339 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,6 +1,6 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "addr2line" @@ -337,6 +337,12 @@ dependencies = [ "typenum", ] +[[package]] +name = "diff" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8" + [[package]] name = "digest" version = "0.10.7" @@ -1050,6 +1056,16 @@ version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" +[[package]] +name = "pretty_assertions" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ae130e2f271fbc2ac3a40fb1d07180839cdbbe443c7a27e1e3c13c5cac0116d" +dependencies = [ + "diff", + "yansi", +] + [[package]] name = "proc-macro2" version = "1.0.84" @@ -1183,6 +1199,7 @@ dependencies = [ "indoc", "libherokubuildpack", "nom", + "pretty_assertions", "regex", "reqwest", "sha2", @@ -1967,3 +1984,9 @@ dependencies = [ "linux-raw-sys", "rustix", ] + +[[package]] +name = "yansi" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfe53a6657fd280eaa890a3bc59152892ffa3e30101319d168b781ed6529b049" diff --git a/Cargo.toml b/Cargo.toml index c60a2eb..03c4e83 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -34,3 +34,4 @@ libherokubuildpack = { version = "0.24.0", default-features = false, features = # File locking (FLOCK) fs2 = "0.4" +pretty_assertions = "1.4.1" diff --git a/jruby_executable/src/bin/jruby_changelog.rs b/jruby_executable/src/bin/jruby_changelog.rs index 9989068..c861347 100644 --- a/jruby_executable/src/bin/jruby_changelog.rs +++ b/jruby_executable/src/bin/jruby_changelog.rs @@ -22,7 +22,7 @@ fn jruby_changelog(args: &Args) -> Result<(), Box> { let changelog = formatdoc! {" ## JRuby version {version} is now available - [JRuby v{version}](/articles/ruby-support#ruby-versions) is now available on Heroku. To run + [JRuby v{version}](/articles/ruby-support-reference#ruby-versions) is now available on Heroku. To run your app using this version of Ruby, add the following `ruby` directive to your Gemfile: ```ruby diff --git a/ruby_executable/Cargo.toml b/ruby_executable/Cargo.toml index 95a0893..2615983 100644 --- a/ruby_executable/Cargo.toml +++ b/ruby_executable/Cargo.toml @@ -21,3 +21,6 @@ libherokubuildpack = { workspace = true } chrono = { workspace = true } sha2 = { workspace = true } gem_version = { workspace = true } + +[dev-dependencies] +pretty_assertions = { workspace = true } diff --git a/ruby_executable/src/bin/ruby_changelog.rs b/ruby_executable/src/bin/ruby_changelog.rs index 7ac624d..3edcc75 100644 --- a/ruby_executable/src/bin/ruby_changelog.rs +++ b/ruby_executable/src/bin/ruby_changelog.rs @@ -29,7 +29,7 @@ where let changelog = formatdoc! {" ## Ruby version {version} is now available - [Ruby v{version}](/articles/ruby-support#ruby-versions) is now available on Heroku. To run + [Ruby v{version}](/articles/ruby-support#ruby-versions) is now available on Heroku. To run \ your app using this version of Ruby, add the following `ruby` directive to your Gemfile: ```ruby @@ -72,6 +72,7 @@ fn main() { #[cfg(test)] mod test { use super::*; + use pretty_assertions::assert_eq; #[test] fn regular_release() { @@ -86,7 +87,7 @@ mod test { ## Ruby version 3.3.2 is now available - [Ruby v3.3.2](/articles/ruby-support#ruby-versions) is now available on Heroku. To run + [Ruby v3.3.2](/articles/ruby-support#ruby-versions) is now available on Heroku. To run \ your app using this version of Ruby, add the following `ruby` directive to your Gemfile: ```ruby @@ -95,7 +96,7 @@ mod test { For more information on [Ruby 3.3.2, you can view the release announcement](https://www.ruby-lang.org/en/news/). "}; - assert_eq!(actual.trim(), expected.trim()); + assert_eq!(expected.trim(), actual.trim()); } #[test] @@ -111,7 +112,7 @@ mod test { ## Ruby version 3.1.0-rc1 is now available - [Ruby v3.1.0-rc1](/articles/ruby-support#ruby-versions) is now available on Heroku. To run + [Ruby v3.1.0-rc1](/articles/ruby-support#ruby-versions) is now available on Heroku. To run \ your app using this version of Ruby, add the following `ruby` directive to your Gemfile: ```ruby