Skip to content

Commit

Permalink
remove test mod
Browse files Browse the repository at this point in the history
  • Loading branch information
o2sh committed Dec 31, 2022
1 parent 2f65efd commit b6e362e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 15 deletions.
2 changes: 0 additions & 2 deletions src/info/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ mod git;
pub mod info_field;
pub mod langs;
mod repo;
#[cfg(test)]
pub mod test;
pub mod title;

#[derive(Serialize)]
Expand Down
12 changes: 0 additions & 12 deletions src/info/test.rs

This file was deleted.

9 changes: 8 additions & 1 deletion src/info/title.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,17 @@ impl std::fmt::Display for Title {
#[cfg(test)]
mod tests {
use super::*;
use crate::info::test::utils::repo;
use anyhow::Result;
use git_repository::{open, Repository, ThreadSafeRepository};
use owo_colors::AnsiColors;

fn repo(name: &str) -> Result<Repository> {
let name = name.to_string();
let repo_path = git_testtools::scripted_fixture_read_only(name).unwrap();
let safe_repo = ThreadSafeRepository::open_opts(repo_path, open::Options::isolated())?;
Ok(safe_repo.to_thread_local())
}

#[test]
fn test_get_git_username() -> Result<()> {
let repo = repo("basic_repo.sh")?;
Expand Down

0 comments on commit b6e362e

Please sign in to comment.