Skip to content

Commit

Permalink
Update function name to script_file due to from_* conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
prsabahrami committed Sep 28, 2024
1 parent 8b7dfd9 commit 6a61a98
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion crates/tests/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -907,7 +907,7 @@ async fn if_clause() {
.await;

TestBuilder::new()
.from_file("../../scripts/if_else.sh")
.script_file("../../scripts/if_else.sh")
.assert_exit_code(0)
.assert_stdout("FOO is 2\n")
.assert_stdout("FOO is 2\n")
Expand Down
5 changes: 3 additions & 2 deletions crates/tests/src/test_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,9 @@ impl TestBuilder {
self
}

pub fn from_file(&mut self, path: &str) -> &mut Self {
self.command(fs::read_to_string(path).unwrap().as_str())
pub fn script_file(&mut self, path: &str) -> &mut Self {
self.command(fs::read_to_string(path).unwrap().as_str());
self
}

pub fn stdin(&mut self, stdin: &str) -> &mut Self {
Expand Down

0 comments on commit 6a61a98

Please sign in to comment.