Skip to content

Commit 9b0ed1d

Browse files
committed
Auto merge of #2257 - nrc:lib-template, r=alexcrichton
2 parents ca37345 + 93f76a8 commit 9b0ed1d

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/cargo/ops/cargo_new.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,11 @@ fn main() {
159159
"));
160160
} else {
161161
try!(paths::write(&path.join("src/lib.rs"), b"\
162-
#[test]
163-
fn it_works() {
162+
#[cfg(test)]
163+
mod test {
164+
#[test]
165+
fn it_works() {
166+
}
164167
}
165168
"));
166169
}

0 commit comments

Comments
 (0)