{"action":"opened","issue":{"url":"https://api.github.com/repos/rust-lang/book/issues/92","repository_url":"https://api.github.com/repos/rust-lang/book","labels_url":"https://api.github.com/repos/rust-lang/book/issues/92/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/book/issues/92/comments","events_url":"https://api.github.com/repos/rust-lang/book/issues/92/events","html_url":"https://github.com/rust-lang/book/issues/92","id":147552306,"number":92,"title":"Cargo-generated new library already contains test module","user":{"login":"golergka","id":929735,"avatar_url":"https://avatars.githubusercontent.com/u/929735?v=3","gravatar_id":"","url":"https://api.github.com/users/golergka","html_url":"https://github.com/golergka","followers_url":"https://api.github.com/users/golergka/followers","following_url":"https://api.github.com/users/golergka/following{/other_user}","gists_url":"https://api.github.com/users/golergka/gists{/gist_id}","starred_url":"https://api.github.com/users/golergka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/golergka/subscriptions","organizations_url":"https://api.github.com/users/golergka/orgs","repos_url":"https://api.github.com/users/golergka/repos","events_url":"https://api.github.com/users/golergka/events{/privacy}","received_events_url":"https://api.github.com/users/golergka/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-04-11T20:53:24Z","updated_at":"2016-04-11T20:53:24Z","closed_at":null,"body":"In 5.2 section \"testing\" book says that a new library source will look like this after generation:\r\n\r\n```rust\r\n#[test]\r\nfn it_works() {\r\n}\r\n```\r\n\r\nBut actually, it looks like this:\r\n\r\n```rust\r\n#[cfg(test)]\r\nmod test {\r\n    #[test]\r\n    fn it_works() {\r\n    }\r\n}\r\n```\r\n\r\nI understand that tests module is described a little bit later. However, this creates an impression that books is not up-to-date with the latest Rust development (which, in my experience of learning Rust, is one of the most painful points of the whole language). Also, it means that if I would want to follow the book to the letter, the section that talks about tests module wouldn't make much sense for me since I would already have the module auto-generated."}}