This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# In this example case when we create paddock objects we want them to be equal | |
# to each other if their name and area are the same and their lat/lng are "close | |
# enough" to each other. In our case we want "close enough" to mean the lat and | |
# lng match up to four decimal places. | |
# | |
# Download this file and the corresponding test case file tc_paddock.rb. Run the | |
# test case file like this `ruby tc_paddock.rb`. Currently all tests fail. | |
# Please make the changes you feel are necessary to make the tests pass, then | |
# make a gist with your version of paddock.rb and let us know. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am jackcasey on github. | |
* I am beetlefeet (https://keybase.io/beetlefeet) on keybase. | |
* I have a public key whose fingerprint is 69FA 9509 0442 9BC8 A800 4712 2C96 5EC9 C43C 511D | |
To claim this, I am signing this object: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module FancyPants | |
class User | |
def name | |
"Mr. #{self.lastname}" | |
end | |
end | |
class Company | |
def name | |
"#{super()} Est. #{self.created_at.year}" | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Feature: Trials api - Authentication | |
In order to display my information on the trials iPad app | |
As a Trial Assessor | |
I want to be able to authenticate with the web service | |
Background: # features/trialsapi_authentication.feature:6 | |
Given there is a company # features/step_definitions/company_steps.rb:1 | |
And there is a trial assessor # features/trialsapi_steps.rb:19 | |
And I accept JSON # features/trialsapi_steps.rb:15 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"inputs(c76A09CC2-AD2F-4223-8F0E-EB4E66339BEF/ActivityInput/p609)__position"=> | |
"0", | |
"pests(c76A09CC2-AD2F-4223-8F0E-EB4E66339BEF/ActivityPest/p328)__position"=> | |
"1", | |
"started_at"=>"0", | |
"inputs(c76A09CC2-AD2F-4223-8F0E-EB4E66339BEF/ActivityInput/p609)__rate"=> | |
"4", | |
"inputs(c76A09CC2-AD2F-4223-8F0E-EB4E66339BEF/ActivityInput/p613)__unit_cost"=> | |
"8", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"pests" => [ | |
{ | |
"coverage" => "0", | |
"position" => "1", | |
"coreDataID" => "76A09CC2-AD2F-4223-8F0E-EB4E66339BEF/ActivityPest/p328", | |
"pest_id" => "3" | |
}, | |
{ | |
"coverage" => "0", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"pests" => [ | |
{ | |
"coverage" => "0", | |
"position" => "0", | |
"coreDataID" => "76A09CC2-AD2F-4223-8F0E-EB4E66339BEF/ActivityPest/p326", | |
"pest_id" => "1274" | |
}, | |
{ | |
"coverage" => "0", |