{"action":"created","comment":{"url":"https://api.github.com/repos/Ada-Developers-Academy/daily-curriculum/pulls/comments/30299580","id":30299580,"diff_hunk":"@@ -0,0 +1,58 @@\n+### RSPEC\n+[Rspec](rspec.info)\n+\n+[Additional Tutorial Info](http://code.tutsplus.com/tutorials/ruby-for-newbies-testing-with-rspec--net-21297)\n+\n+#### Setting Up\n+Install Rspec\n+``` gem install rspec ```\n+\n+For each class file that we create, we create one spec file.\n+\n+Create the ```chair_spec.rb``` test file.\n+```\n+require 'spec_helper'\n+\n+describe Chair do\n+\n+end\n+```\n+\n+Use a ```before``` block to run a specific block of code before every test is run. In this before block example, we will ensure we have an instance of our chair object before we execute these tests.\n+\n+```\n+before :each do\n+    @chair = Chair.new \"Spinny\", \"Yellow\", :height\n+end\n+```\n+\n+Use the describe block to specify actions of a method.\n+```\n+describe \"#new\" do\n+    it \"takes three parameters and returns a Chair object\" do\n+        @chair.should be_an_instance_of Chair\n+    end\n+end\n+```\n+This test simply confirms that we have indeed made a Chair object.\n+\n+You’ll notice I’ve used the string ```#new``` this is a convention in Ruby to refer to instance methods like this: ```ClassName#methodName``` Since we have the class name in our top-level describe, we’re just putting the method name here.\n+\n+Also notice the grammar we use within the block here: ```object.should do_something```. Ninety-nine percent of your tests will take this form: you have an object, and you start by calling ```should``` or ```should_not``` on the object.","path":"topic_resources/rspec.md","position":41,"original_position":41,"commit_id":"145c63330bc26b042922529b2179d8dbcb13b432","original_commit_id":"145c63330bc26b042922529b2179d8dbcb13b432","user":{"login":"Elffers","id":5466070,"avatar_url":"https://avatars.githubusercontent.com/u/5466070?v=3","gravatar_id":"","url":"https://api.github.com/users/Elffers","html_url":"https://github.com/Elffers","followers_url":"https://api.github.com/users/Elffers/followers","following_url":"https://api.github.com/users/Elffers/following{/other_user}","gists_url":"https://api.github.com/users/Elffers/gists{/gist_id}","starred_url":"https://api.github.com/users/Elffers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Elffers/subscriptions","organizations_url":"https://api.github.com/users/Elffers/orgs","repos_url":"https://api.github.com/users/Elffers/repos","events_url":"https://api.github.com/users/Elffers/events{/privacy}","received_events_url":"https://api.github.com/users/Elffers/received_events","type":"User","site_admin":false},"body":"Another note: the most recent version of rspec (3.2) tends to use the `expect(object).to eq` syntax rather than the .`should` syntax. (The blog post referenced is from 2011, so those changes may not have been implemented then) Not sure if this is an important distinction in the context of a first-time intro to rspec, but presumably the students will be using the newest gems.","created_at":"2015-05-14T05:57:17Z","updated_at":"2015-05-14T05:57:17Z","html_url":"https://github.com/Ada-Developers-Academy/daily-curriculum/pull/115#discussion_r30299580","pull_request_url":"https://api.github.com/repos/Ada-Developers-Academy/daily-curriculum/pulls/115","_links":{"self":{"href":"https://api.github.com/repos/Ada-Developers-Academy/daily-curriculum/pulls/comments/30299580"},"html":{"href":"https://github.com/Ada-Developers-Academy/daily-curriculum/pull/115#discussion_r30299580"},"pull_request":{"href":"https://api.github.com/repos/Ada-Developers-Academy/daily-curriculum/pulls/115"}}},"pull_request":{"url":"https://api.github.com/repos/Ada-Developers-Academy/daily-curriculum/pulls/115","id":35356543,"html_url":"https://github.com/Ada-Developers-Academy/daily-curriculum/pull/115","diff_url":"https://github.com/Ada-Developers-Academy/daily-curriculum/pull/115.diff","patch_url":"https://github.com/Ada-Developers-Academy/daily-curriculum/pull/115.patch","issue_url":"https://api.github.com/repos/Ada-Developers-Academy/daily-curriculum/issues/115","number":115,"state":"open","locked":false,"title":"Rspec","user":{"login":"kariabancroft","id":7269204,"avatar_url":"https://avatars.githubusercontent.com/u/7269204?v=3","gravatar_id":"","url":"https://api.github.com/users/kariabancroft","html_url":"https://github.com/kariabancroft","followers_url":"https://api.github.com/users/kariabancroft/followers","following_url":"https://api.github.com/users/kariabancroft/following{/other_user}","gists_url":"https://api.github.com/users/kariabancroft/gists{/gist_id}","starred_url":"https://api.github.com/users/kariabancroft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kariabancroft/subscriptions","organizations_url":"https://api.github.com/users/kariabancroft/orgs","repos_url":"https://api.github.com/users/kariabancroft/repos","events_url":"https://api.github.com/users/kariabancroft/events{/privacy}","received_events_url":"https://api.github.com/users/kariabancroft/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-05-13T18:32:22Z","updated_at":"2015-05-14T05:57:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c30b6ccab99d121b5ed8f3b008f14b3288a294f4","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Ada-Developers-Academy/daily-curriculum/pulls/115/commits","review_comments_url":"https://api.github.com/repos/Ada-Developers-Academy/daily-curriculum/pulls/115/comments","review_comment_url":"https://api.github.com/repos/Ada-Developers-Academy/daily-curriculum/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Ada-Developers-Academy/daily-curriculum/issues/115/comments","statuses_url":"https://api.github.com/repos/Ada-Developers-Academy/daily-curriculum/statuses/145c63330bc26b042922529b2179d8dbcb13b432","head":{"label":"Ada-Developers-Academy:RSpec","ref":"RSpec","sha":"145c63330bc26b042922529b2179d8dbcb13b432","user":{"login":"Ada-Developers-Academy","id":4689715,"avatar_url":"https://avatars.githubusercontent.com/u/4689715?v=3","gravatar_id":"","url":"https://api.github.com/users/Ada-Developers-Academy","html_url":"https://github.com/Ada-Developers-Academy","followers_url":"https://api.github.com/users/Ada-Developers-Academy/followers","following_url":"https://api.github.com/users/Ada-Developers-Academy/following{/other_user}","gists_url":"https://api.github.com/users/Ada-Developers-Academy/gists{/gist_id}","starred_url":"https://api.github.com/users/Ada-Developers-Academy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ada-Developers-Academy/subscriptions","organizations_url":"https://api.github.com/users/Ada-Developers-Academy/orgs","repos_url":"https://api.github.com/users/Ada-Developers-Academy/repos","events_url":"https://api.github.com/users/Ada-Developers-Academy/events{/privacy}","received_events_url":"https://api.github.com/users/Ada-Developers-Academy/received_events","type":"Organization","site_admin":false},"repo":{"id":13663023,"name":"daily-curriculum","full_name":"Ada-Developers-Academy/daily-curriculum","owner":{"login":"Ada-Developers-Academy","id":4689715,"avatar_url":"https://avatars.githubusercontent.com/u/4689715?v=3","gravatar_id":"","url":"https://api.github.com/users/Ada-Developers-Academy","html_url":"https://github.com/Ada-Developers-Academy","followers_url":"https://api.github.com/users/Ada-Developers-Academy/followers","following_url":"https://api.github.com/users/Ada-Developers-Academy/following{/other_user}","gists_url":"https://api.github.com/users/Ada-Developers-Academy/gists{/gist_id}","starred_url":"https://api.github.com/users/Ada-Developers-Academy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ada-Developers-Academy/subscriptions","organizations_url":"https://api.github.com/users/Ada-Developers-Academy/orgs","repos_url":"https://api.github.com/users/Ada-Developers-Academy/repos","events_url":"https://api.github.com/users/Ada-Developers-Academy/events{/privacy}","received_events_url":"https://api.github.com/users/Ada-Developers-Academy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Ada-Developers-Academy/daily-curriculum","description":"Daily curriculum for Ada class","fork":false,"url":"https://api.github.com/repos/Ada-Developers-Academy/daily-curriculum","forks_url":"https://api.github.com/repos/Ada-Developers-Academy/daily-curriculum/forks","keys_url":"https://api.github.com/repos/Ada-Developers-Academy/daily-curriculum/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Ada-Developers-Academy/daily-curriculum/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Ada-Developers-Academy/daily-curriculum/teams","hooks_url":"https://api.github.com/repos/Ada-Developers-Academy/daily-curriculum/hooks","issue_events_url":"https://api.github.com/repos/Ada-Developers-Academy/daily-curriculum/issues/events{/number}","events_url":"https://api.github.com/repos/Ada-Developers-Academy/daily-curriculum/events","assignees_url":"https://api.github.com/repos/Ada-Developers-Academy/daily-curriculum/assignees{/user}","branches_url":"https://api.github.com/repos/Ada-Developers-Academy/daily-curriculum/branches{/branch}","tags_url":"https://api.github.com/repos/Ada-Developers-Academy/daily-curriculum/tags","blobs_url":"https://api.github.com/repos/Ada-Developers-Academy/daily-curriculum/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Ada-Developers-Academy/daily-curriculum/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Ada-Developers-Academy/daily-curriculum/git/refs{/sha}","trees_url":"https://api.github.com/repos/Ada-Developers-Academy/daily-curriculum/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Ada-Developers-Academy/daily-curriculum/statuses/{sha}","languages_url":"https://api.github.com/repos/Ada-Developers-Academy/daily-curriculum/languages","stargazers_url":"https://api.github.com/repos/Ada-Developers-Academy/daily-curriculum/stargazers","contributors_url":"https://api.github.com/repos/Ada-Developers-Academy/daily-curriculum/contributors","subscribers_url":"https://api.github.com/repos/Ada-Developers-Academy/daily-curriculum/subscribers","subscription_url":"https://api.github.com/repos/Ada-Developers-Academy/daily-curriculum/subscription","commits_url":"https://api.github.com/repos/Ada-Developers-Academy/daily-curriculum/commits{/sha}","git_commits_url":"https://api.github.com/repos/Ada-Developers-Academy/daily-curriculum/git/commits{/sha}","comments_url":"https://api.github.com/repos/Ada-Developers-Academy/daily-curriculum/comments{/number}","issue_comment_url":"https://api.github.com/repos/Ada-Developers-Academy/daily-curriculum/issues/comments{/number}","contents_url":"https://api.github.com/repos/Ada-Developers-Academy/daily-curriculum/contents/{+path}","compare_url":"https://api.github.com/repos/Ada-Developers-Academy/daily-curriculum/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Ada-Developers-Academy/daily-curriculum/merges","archive_url":"https://api.github.com/repos/Ada-Developers-Academy/daily-curriculum/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Ada-Developers-Academy/daily-curriculum/downloads","issues_url":"https://api.github.com/repos/Ada-Developers-Academy/daily-curriculum/issues{/number}","pulls_url":"https://api.github.com/repos/Ada-Developers-Academy/daily-curriculum/pulls{/number}","milestones_url":"https://api.github.com/repos/Ada-Developers-Academy/daily-curriculum/milestones{/number}","notifications_url":"https://api.github.com/repos/Ada-Developers-Academy/daily-curriculum/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Ada-Developers-Academy/daily-curriculum/labels{/name}","releases_url":"https://api.github.com/repos/Ada-Developers-Academy/daily-curriculum/releases{/id}","created_at":"2013-10-17T22:36:08Z","updated_at":"2015-05-12T17:52:10Z","pushed_at":"2015-05-13T22:26:08Z","git_url":"git://github.com/Ada-Developers-Academy/daily-curriculum.git","ssh_url":"git@github.com:Ada-Developers-Academy/daily-curriculum.git","clone_url":"https://github.com/Ada-Developers-Academy/daily-curriculum.git","svn_url":"https://github.com/Ada-Developers-Academy/daily-curriculum","homepage":"","size":89303,"stargazers_count":43,"watchers_count":43,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":45,"mirror_url":null,"open_issues_count":2,"forks":45,"open_issues":2,"watchers":43,"default_branch":"master"}},"base":{"label":"Ada-Developers-Academy:master","ref":"master","sha":"8c60a0997ed248b8fff3ae222644f6753747b836","user":{"login":"Ada-Developers-Academy","id":4689715,"avatar_url":"https://avatars.githubusercontent.com/u/4689715?v=3","gravatar_id":"","url":"https://api.github.com/users/Ada-Developers-Academy","html_url":"https://github.com/Ada-Developers-Academy","followers_url":"https://api.github.com/users/Ada-Developers-Academy/followers","following_url":"https://api.github.com/users/Ada-Developers-Academy/following{/other_user}","gists_url":"https://api.github.com/users/Ada-Developers-Academy/gists{/gist_id}","starred_url":"https://api.github.com/users/Ada-Developers-Academy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ada-Developers-Academy/subscriptions","organizations_url":"https://api.github.com/users/Ada-Developers-Academy/orgs","repos_url":"https://api.github.com/users/Ada-Developers-Academy/repos","events_url":"https://api.github.com/users/Ada-Developers-Academy/events{/privacy}","received_events_url":"https://api.github.com/users/Ada-Developers-Academy/received_events","type":"Organization","site_admin":false},"repo":{"id":13663023,"name":"daily-curriculum","full_name":"Ada-Developers-Academy/daily-curriculum","owner":{"login":"Ada-Developers-Academy","id":4689715,"avatar_url":"https://avatars.githubusercontent.com/u/4689715?v=3","gravatar_id":"","url":"https://api.github.com/users/Ada-Developers-Academy","html_url":"https://github.com/Ada-Developers-Academy","followers_url":"https://api.github.com/users/Ada-Developers-Academy/followers","following_url":"https://api.github.com/users/Ada-Developers-Academy/following{/other_user}","gists_url":"https://api.github.com/users/Ada-Developers-Academy/gists{/gist_id}","starred_url":"https://api.github.com/users/Ada-Developers-Academy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ada-Developers-Academy/subscriptions","organizations_url":"https://api.github.com/users/Ada-Developers-Academy/orgs","repos_url":"https://api.github.com/users/Ada-Developers-Academy/repos","events_url":"https://api.github.com/users/Ada-Developers-Academy/events{/privacy}","received_events_url":"https://api.github.com/users/Ada-Developers-Academy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Ada-Developers-Academy/daily-curriculum","description":"Daily curriculum for Ada class","fork":false,"url":"https://api.github.com/repos/Ada-Developers-Academy/daily-curriculum","forks_url":"https://api.github.com/repos/Ada-Developers-Academy/daily-curriculum/forks","keys_url":"https://api.github.com/repos/Ada-Developers-Academy/daily-curriculum/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Ada-Developers-Academy/daily-curriculum/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Ada-Developers-Academy/daily-curriculum/teams","hooks_url":"https://api.github.com/repos/Ada-Developers-Academy/daily-curriculum/hooks","issue_events_url":"https://api.github.com/repos/Ada-Developers-Academy/daily-curriculum/issues/events{/number}","events_url":"https://api.github.com/repos/Ada-Developers-Academy/daily-curriculum/events","assignees_url":"https://api.github.com/repos/Ada-Developers-Academy/daily-curriculum/assignees{/user}","branches_url":"https://api.github.com/repos/Ada-Developers-Academy/daily-curriculum/branches{/branch}","tags_url":"https://api.github.com/repos/Ada-Developers-Academy/daily-curriculum/tags","blobs_url":"https://api.github.com/repos/Ada-Developers-Academy/daily-curriculum/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Ada-Developers-Academy/daily-curriculum/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Ada-Developers-Academy/daily-curriculum/git/refs{/sha}","trees_url":"https://api.github.com/repos/Ada-Developers-Academy/daily-curriculum/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Ada-Developers-Academy/daily-curriculum/statuses/{sha}","languages_url":"https://api.github.com/repos/Ada-Developers-Academy/daily-curriculum/languages","stargazers_url":"https://api.github.com/repos/Ada-Developers-Academy/daily-curriculum/stargazers","contributors_url":"https://api.github.com/repos/Ada-Developers-Academy/daily-curriculum/contributors","subscribers_url":"https://api.github.com/repos/Ada-Developers-Academy/daily-curriculum/subscribers","subscription_url":"https://api.github.com/repos/Ada-Developers-Academy/daily-curriculum/subscription","commits_url":"https://api.github.com/repos/Ada-Developers-Academy/daily-curriculum/commits{/sha}","git_commits_url":"https://api.github.com/repos/Ada-Developers-Academy/daily-curriculum/git/commits{/sha}","comments_url":"https://api.github.com/repos/Ada-Developers-Academy/daily-curriculum/comments{/number}","issue_comment_url":"https://api.github.com/repos/Ada-Developers-Academy/daily-curriculum/issues/comments{/number}","contents_url":"https://api.github.com/repos/Ada-Developers-Academy/daily-curriculum/contents/{+path}","compare_url":"https://api.github.com/repos/Ada-Developers-Academy/daily-curriculum/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Ada-Developers-Academy/daily-curriculum/merges","archive_url":"https://api.github.com/repos/Ada-Developers-Academy/daily-curriculum/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Ada-Developers-Academy/daily-curriculum/downloads","issues_url":"https://api.github.com/repos/Ada-Developers-Academy/daily-curriculum/issues{/number}","pulls_url":"https://api.github.com/repos/Ada-Developers-Academy/daily-curriculum/pulls{/number}","milestones_url":"https://api.github.com/repos/Ada-Developers-Academy/daily-curriculum/milestones{/number}","notifications_url":"https://api.github.com/repos/Ada-Developers-Academy/daily-curriculum/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Ada-Developers-Academy/daily-curriculum/labels{/name}","releases_url":"https://api.github.com/repos/Ada-Developers-Academy/daily-curriculum/releases{/id}","created_at":"2013-10-17T22:36:08Z","updated_at":"2015-05-12T17:52:10Z","pushed_at":"2015-05-13T22:26:08Z","git_url":"git://github.com/Ada-Developers-Academy/daily-curriculum.git","ssh_url":"git@github.com:Ada-Developers-Academy/daily-curriculum.git","clone_url":"https://github.com/Ada-Developers-Academy/daily-curriculum.git","svn_url":"https://github.com/Ada-Developers-Academy/daily-curriculum","homepage":"","size":89303,"stargazers_count":43,"watchers_count":43,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":45,"mirror_url":null,"open_issues_count":2,"forks":45,"open_issues":2,"watchers":43,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Ada-Developers-Academy/daily-curriculum/pulls/115"},"html":{"href":"https://github.com/Ada-Developers-Academy/daily-curriculum/pull/115"},"issue":{"href":"https://api.github.com/repos/Ada-Developers-Academy/daily-curriculum/issues/115"},"comments":{"href":"https://api.github.com/repos/Ada-Developers-Academy/daily-curriculum/issues/115/comments"},"review_comments":{"href":"https://api.github.com/repos/Ada-Developers-Academy/daily-curriculum/pulls/115/comments"},"review_comment":{"href":"https://api.github.com/repos/Ada-Developers-Academy/daily-curriculum/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Ada-Developers-Academy/daily-curriculum/pulls/115/commits"},"statuses":{"href":"https://api.github.com/repos/Ada-Developers-Academy/daily-curriculum/statuses/145c63330bc26b042922529b2179d8dbcb13b432"}}}}