{"action":"created","issue":{"url":"https://api.github.com/repos/westfieldlabs/apivore/issues/12","labels_url":"https://api.github.com/repos/westfieldlabs/apivore/issues/12/labels{/name}","comments_url":"https://api.github.com/repos/westfieldlabs/apivore/issues/12/comments","events_url":"https://api.github.com/repos/westfieldlabs/apivore/issues/12/events","html_url":"https://github.com/westfieldlabs/apivore/pull/12","id":54534528,"number":12,"title":"DO NOT MERGE, REVIEW ONLY add apivore integration tests to verify negative use cases","user":{"login":"hornc","id":905545,"avatar_url":"https://avatars.githubusercontent.com/u/905545?v=3","gravatar_id":"","url":"https://api.github.com/users/hornc","html_url":"https://github.com/hornc","followers_url":"https://api.github.com/users/hornc/followers","following_url":"https://api.github.com/users/hornc/following{/other_user}","gists_url":"https://api.github.com/users/hornc/gists{/gist_id}","starred_url":"https://api.github.com/users/hornc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hornc/subscriptions","organizations_url":"https://api.github.com/users/hornc/orgs","repos_url":"https://api.github.com/users/hornc/repos","events_url":"https://api.github.com/users/hornc/events{/privacy}","received_events_url":"https://api.github.com/users/hornc/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-01-16T02:57:18Z","updated_at":"2015-01-16T22:49:59Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/westfieldlabs/apivore/pulls/12","html_url":"https://github.com/westfieldlabs/apivore/pull/12","diff_url":"https://github.com/westfieldlabs/apivore/pull/12.diff","patch_url":"https://github.com/westfieldlabs/apivore/pull/12.patch"},"body":"This is my attempt at adding some tests to check apivore will fail when a description and API do not match up.\r\n\r\nI'm using a simplified version of the approach used by rspec to test rspec using rspec. This runs rspec as a system command rather than calling the rspec runner again (to avoid conflicts by running nested tests in the same env).\r\n\r\nI feel there is a bit of duplication and the test set-up could be neater, so I'm putting this up as a WIP for comment while I think on a way to make it neater. I've gone for getting the basic tests working in the first place, and then I'll tidy up, then add the remainder of the scenarios I have identified.\r\n\r\nSome of the text expectations are too coupled to rspec for my liking too.\r\n\r\nI'd like a way to avoid having many copies of the same swagger file with only minor modifications to set up the scenarios. I was thinking of just altering the json programatically as needed, but I'm not sure where to do this. It'd be easiest from within the spec/fixtures/application.rb file, but I think it'd be neater if the expected json response could be set in the spec file with the particular test.\r\n\r\n@benpritchard @leondewey , I'd appreciate any comments you have on this PR. Feel free to get in touch if you need more context, it took me multiple goes to find an approach that even worked at all, so it's probably difficult to get at first glance.\r\n\r\nCheers,\r\nCharles."},"comment":{"url":"https://api.github.com/repos/westfieldlabs/apivore/issues/comments/70335542","html_url":"https://github.com/westfieldlabs/apivore/pull/12#issuecomment-70335542","issue_url":"https://api.github.com/repos/westfieldlabs/apivore/issues/12","id":70335542,"user":{"login":"leondewey","id":24807,"avatar_url":"https://avatars.githubusercontent.com/u/24807?v=3","gravatar_id":"","url":"https://api.github.com/users/leondewey","html_url":"https://github.com/leondewey","followers_url":"https://api.github.com/users/leondewey/followers","following_url":"https://api.github.com/users/leondewey/following{/other_user}","gists_url":"https://api.github.com/users/leondewey/gists{/gist_id}","starred_url":"https://api.github.com/users/leondewey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leondewey/subscriptions","organizations_url":"https://api.github.com/users/leondewey/orgs","repos_url":"https://api.github.com/users/leondewey/repos","events_url":"https://api.github.com/users/leondewey/events{/privacy}","received_events_url":"https://api.github.com/users/leondewey/received_events","type":"User","site_admin":false},"created_at":"2015-01-16T22:49:59Z","updated_at":"2015-01-16T22:49:59Z","body":"I think undocumented fields should fail... Think the idea is that you can add a field to a version with out having to bump the number. "}}