{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/37368","repository_url":"https://api.github.com/repos/rust-lang/rust","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/37368/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/37368/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/37368/events","html_url":"https://github.com/rust-lang/rust/pull/37368","id":184719771,"number":37368,"title":"Update testing.md to reflect changes to cargo new","user":{"login":"trotter","id":413,"avatar_url":"https://avatars.githubusercontent.com/u/413?v=3","gravatar_id":"","url":"https://api.github.com/users/trotter","html_url":"https://github.com/trotter","followers_url":"https://api.github.com/users/trotter/followers","following_url":"https://api.github.com/users/trotter/following{/other_user}","gists_url":"https://api.github.com/users/trotter/gists{/gist_id}","starred_url":"https://api.github.com/users/trotter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trotter/subscriptions","organizations_url":"https://api.github.com/users/trotter/orgs","repos_url":"https://api.github.com/users/trotter/repos","events_url":"https://api.github.com/users/trotter/events{/privacy}","received_events_url":"https://api.github.com/users/trotter/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"steveklabnik","id":27786,"avatar_url":"https://avatars.githubusercontent.com/u/27786?v=3","gravatar_id":"","url":"https://api.github.com/users/steveklabnik","html_url":"https://github.com/steveklabnik","followers_url":"https://api.github.com/users/steveklabnik/followers","following_url":"https://api.github.com/users/steveklabnik/following{/other_user}","gists_url":"https://api.github.com/users/steveklabnik/gists{/gist_id}","starred_url":"https://api.github.com/users/steveklabnik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/steveklabnik/subscriptions","organizations_url":"https://api.github.com/users/steveklabnik/orgs","repos_url":"https://api.github.com/users/steveklabnik/repos","events_url":"https://api.github.com/users/steveklabnik/events{/privacy}","received_events_url":"https://api.github.com/users/steveklabnik/received_events","type":"User","site_admin":false},"assignees":[{"login":"steveklabnik","id":27786,"avatar_url":"https://avatars.githubusercontent.com/u/27786?v=3","gravatar_id":"","url":"https://api.github.com/users/steveklabnik","html_url":"https://github.com/steveklabnik","followers_url":"https://api.github.com/users/steveklabnik/followers","following_url":"https://api.github.com/users/steveklabnik/following{/other_user}","gists_url":"https://api.github.com/users/steveklabnik/gists{/gist_id}","starred_url":"https://api.github.com/users/steveklabnik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/steveklabnik/subscriptions","organizations_url":"https://api.github.com/users/steveklabnik/orgs","repos_url":"https://api.github.com/users/steveklabnik/repos","events_url":"https://api.github.com/users/steveklabnik/events{/privacy}","received_events_url":"https://api.github.com/users/steveklabnik/received_events","type":"User","site_admin":false}],"milestone":null,"comments":14,"created_at":"2016-10-23T22:15:23Z","updated_at":"2016-11-10T16:00:05Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/rust-lang/rust/pulls/37368","html_url":"https://github.com/rust-lang/rust/pull/37368","diff_url":"https://github.com/rust-lang/rust/pull/37368.diff","patch_url":"https://github.com/rust-lang/rust/pull/37368.patch"},"body":"`cargo new` now creates a `src/lib.rs` with a `tests` module by default. I've updated the earlier examples in this doc to reflect this. However, I don't know how we want to approach the \"introduction\" to idiomatic testing that follows in \"the tests module\" section. I _think_ it should be broken apart, with the module concept being introduced early on, and the `super` concept being addressed when we hit the `add_two` example. I'd like to get agreement on that being the right approach before I do it though.\n\nI _also_ removed the `#fn main() {}` hidden at the beginning of each example, as these cause Rust Playground to not treat the file as a set of tests that it can run. Removing it _should_ cause Rust Playground to display a \"Test >\" button in the top left when a user runs the code, which will allow them to see the test runner output.\n"},"comment":{"url":"https://api.github.com/repos/rust-lang/rust/issues/comments/259728511","html_url":"https://github.com/rust-lang/rust/pull/37368#issuecomment-259728511","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/37368","id":259728511,"user":{"login":"trotter","id":413,"avatar_url":"https://avatars.githubusercontent.com/u/413?v=3","gravatar_id":"","url":"https://api.github.com/users/trotter","html_url":"https://github.com/trotter","followers_url":"https://api.github.com/users/trotter/followers","following_url":"https://api.github.com/users/trotter/following{/other_user}","gists_url":"https://api.github.com/users/trotter/gists{/gist_id}","starred_url":"https://api.github.com/users/trotter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trotter/subscriptions","organizations_url":"https://api.github.com/users/trotter/orgs","repos_url":"https://api.github.com/users/trotter/repos","events_url":"https://api.github.com/users/trotter/events{/privacy}","received_events_url":"https://api.github.com/users/trotter/received_events","type":"User","site_admin":false},"created_at":"2016-11-10T16:00:05Z","updated_at":"2016-11-10T16:00:05Z","body":"@steveklabnik This should be good to merge now. I've fixed the examples such that play.rust-lang.org will correctly run the code as tests. I also removed my earlier additions of `mod tests` in favor of the approach you took in rust-lang/book#288. Let me know if anything else needs changing."}}
{"actor":{"display_login":"trotter"}}