-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdoc.txt
135 lines (123 loc) · 5.51 KB
/
doc.txt
1
2
3
4
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
CollectiveService
#find_succesful_collectives
[32m should include #<Collectives::Collective:0x000055a467c7aab8 @uuid="uuid-1", @slug="slug-1", @image="http://example.c...Collectives::FinancialReport:0x000055a467c7af40 @currency="EUR", @balance=950, @yearly_income=2000>>[0m
[32m should not include #<Collectives::Collective:0x000055a466e9bc30 @uuid="uuid-11", @slug="slug-11", @image="http://example...Collectives::FinancialReport:0x000055a466e88770 @currency="EUR", @balance=950, @yearly_income=2000>>[0m
#find_upcoming_collectives
[32m should include #<Collectives::Collective:0x000055a4674e2698 @uuid="uuid-20", @slug="slug-20", @image="http://example...Collectives::FinancialReport:0x000055a4674e3250 @currency="EUR", @balance=950, @yearly_income=2000>>[0m
[32m should not include #<Collectives::Collective:0x000055a467992148 @uuid="uuid-28", @slug="slug-28", @image="http://example...Collectives::FinancialReport:0x000055a4679925d0 @currency="EUR", @balance=950, @yearly_income=2000>>[0m
FinancialInspectionService
#calculate_total_assets
[32m should include {"USD" => (a value >= 1000)}[0m
#calculate_collective_assets
[32m should include {"USD" => 1000}[0m
AssetsService
#asset_sums_by_currency
[32m should include {"USD" => 2000, "PLN" => 9000}[0m
Collectives::LowContributorsSpecification
behaves like a specification
[32m should respond to #and with 1 argument[0m
[32m should respond to #or with 1 argument[0m
[32m should respond to #not with 1 argument[0m
[32m should respond to #satisfies? with 1 argument[0m
#satisifes?
valid canidate satisfies
[32m should be truthy[0m
invalid canidate does not satisfy
[32m should be falsy[0m
Collectives::SuccessfulCollectiveSpecification
behaves like a specification
[32m should respond to #and with 1 argument[0m
[32m should respond to #or with 1 argument[0m
[32m should respond to #not with 1 argument[0m
[32m should respond to #satisfies? with 1 argument[0m
#satisifes?
valid canidate satisfies
[32m should be truthy[0m
invalid canidate does not satisfy
[32m should be falsy[0m
Collectives::UpcomingCollectiveSpecification
behaves like a specification
[32m should respond to #and with 1 argument[0m
[32m should respond to #or with 1 argument[0m
[32m should respond to #not with 1 argument[0m
[32m should respond to #satisfies? with 1 argument[0m
#satisifes?
valid canidate satisfies
[32m should be truthy[0m
invalid canidate does not satisfy
[32m should be falsy[0m
Web::Server
GET /collectives
behaves like a get endpoint
[32m returns status 200[0m
[32m returns Content-Type as application/json[0m
body
[32m returns a collection[0m
behaves like object matches collective schema
[32m returns a matching collective[0m
GET /collectives/:id
behaves like a get endpoint
[32m returns status 200[0m
[32m returns Content-Type as application/json[0m
body
behaves like object matches collective schema
[32m returns a matching collective[0m
GET /assets
behaves like a get endpoint
[32m returns status 200[0m
[32m returns Content-Type as application/json[0m
body
[32m returns a list of assets[0m
GET /collectives/:id/assets
behaves like a get endpoint
[32m returns status 200[0m
[32m returns Content-Type as application/json[0m
body
[32m returns the correct assets[0m
CollectiveRepoFake
[32m should respond to #find_by_uuid with 1 argument[0m
[32m should respond to #all with 0 arguments[0m
[32m should respond to #find_by with 1 argument[0m
[32m should respond to #known_collectives with 0 arguments[0m
#find_by_uuid
when collective exists
[32m should be a kind of Collectives::Collective[0m
when collective does not exists
[32m raises a Repo::EntityNotFound error[0m
#all
[32m should be a kind of Enumerable[0m
[32m should not be empty[0m
[32m should all be a kind of Collectives::Collective[0m
#find_by
[32m should be a kind of Enumerable[0m
[32m should not be empty[0m
[32m should all be a kind of Collectives::Collective[0m
Collectives::CollectiveRepo
[32m should respond to #find_by_uuid with 1 argument[0m
[32m should respond to #all with 0 arguments[0m
[32m should respond to #find_by with 1 argument[0m
[32m should respond to #known_collectives with 0 arguments[0m
#find_by_uuid
when collective exists
[32m should be a kind of Collectives::Collective[0m
when collective does not exists
[32m raises a Repo::EntityNotFound error[0m
#all
[32m should be a kind of Enumerable[0m
[32m should not be empty[0m
[32m should all be a kind of Collectives::Collective[0m
#find_by
[32m should be a kind of Enumerable[0m
[32m should not be empty[0m
[32m should all be a kind of Collectives::Collective[0m
OpenCollective::Client
#find_by_slug
[32m should be a kind of OpenCollective::Response[0m
#error
[32m should be nil[0m
#success?
[32m should be truthy[0m
.data
[32m should include {"slug" => (be a kind of String), "currency" => (be a currency code), "image" => (start with "http"), "balance" => (be a kind of Integer), "yearlyIncome" => (be a kind of Integer), "backersCount" => (be a kind of Integer), "contributorsCount" => (be a kind of Integer)}[0m
Finished in 7.42 seconds (files took 0.46046 seconds to load)
[32m66 examples, 0 failures[0m