feat(package): configurable displaying package version for packages marked as private (#1109)

* feat(package): config for enabling package version in private packages

* test(package): refactor package tests
This commit is contained in:
Karol Fuksiewicz
2020-04-28 10:53:30 +02:00
committed by GitHub
parent 8e8519552f
commit eba4d87612
14 changed files with 301 additions and 201 deletions
+3 -3
View File
@@ -55,7 +55,7 @@ mod tests {
#[test]
fn folder_without_crystal_files() -> io::Result<()> {
let dir = tempfile::tempdir()?;
let actual = render_module("crystal", dir.path());
let actual = render_module("crystal", dir.path(), None);
let expected = None;
assert_eq!(expected, actual);
@@ -67,7 +67,7 @@ mod tests {
let dir = tempfile::tempdir()?;
File::create(dir.path().join("shard.yml"))?.sync_all()?;
let actual = render_module("crystal", dir.path());
let actual = render_module("crystal", dir.path(), None);
let expected = Some(format!("via {} ", Color::Red.bold().paint("🔮 v0.32.1")));
assert_eq!(expected, actual);
@@ -79,7 +79,7 @@ mod tests {
let dir = tempfile::tempdir()?;
File::create(dir.path().join("main.cr"))?.sync_all()?;
let actual = render_module("crystal", dir.path());
let actual = render_module("crystal", dir.path(), None);
let expected = Some(format!("via {} ", Color::Red.bold().paint("🔮 v0.32.1")));
assert_eq!(expected, actual);