Class: Heroku::Client::ApiTest

Inherits:
Object
  • Object
show all
Defined in:
lib/heroku-client/api_test.rb

Instance Method Summary collapse

Instance Method Details

#appsObject



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# File 'lib/heroku-client/api_test.rb', line 5

def apps
  json_fake_1 = <<-JSON
{
    "id": 1000000,
    "name": "example",
    "create_status": "complete",
    "created_at": "2011/01/01 00:00:00 -0700",
    "stack": "bamboo-ree-1.8.7",
    "requested_stack": null,
    "repo_migrate_status": "complete",
    "slug_size": 1000000,
    "repo_size": 1000000,
    "dynos": 1,
    "workers": 0
}
  JSON

  json_fake_2 = <<-JSON
{
    "id": 1000001,
    "name": "example_2",
    "create_status": "complete",
    "created_at": "2011/01/01 00:00:00 -0700",
    "stack": "bamboo-ree-1.8.7",
    "requested_stack": null,
    "repo_migrate_status": "complete",
    "slug_size": 1000000,
    "repo_size": 1000000,
    "dynos": 1,
    "workers": 0
}
  JSON

  [ json_fake_1, json_fake_2 ].map do |json|
    HerokuObj.new JSON.parse(json)
  end
end