Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions crates/socket-patch-cli/tests/e2e_redirect_gem_build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3673,6 +3673,15 @@ fn vendor_eject_keeps_the_hosted_group_pin(fx: &RedirectFixture, dry_run: bool)
events[0]["errorCode"], "gemfile_declaration_not_editable",
"{label}: {env}"
);
// #2091: the refusal says how to get out of it. The gem is declared in
// a `group :development do` block, which one top-level option replaces,
// and it is hosted already, so hosted mode is the mode to leave it to.
let detail = events[0]["error"].as_str().unwrap_or_default();
assert!(
detail.contains("move it to the top level with the option `group: :development`")
&& detail.contains(&format!("or leave {DEP} to hosted mode (`--mode hosted`)")),
"{label}: the refusal names both ways out: {env}"
);
assert_eq!(env["error"]["code"], "eject_refused", "{label}: {env}");
assert!(
!stdout.contains("eject_planned") && !stdout.contains("eject_rolled_back"),
Expand Down
Loading
Loading