File tree Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -145,8 +145,24 @@ class Dummy
145
145
end
146
146
end
147
147
148
- xdescribe '.routes' do
149
- it 'does some thing'
148
+ describe '.routes' do
149
+ let ( :routes ) { Object . new }
150
+
151
+ it 'returns value received from #prepare_routes' do
152
+ expect ( subject ) . to receive ( :prepare_routes ) . and_return ( routes )
153
+ expect ( subject . routes ) . to eq routes
154
+ end
155
+
156
+ context 'when #routes was already called once' do
157
+ before do
158
+ allow ( subject ) . to receive ( :prepare_routes ) . and_return ( routes )
159
+ subject . routes
160
+ end
161
+ it 'it does not call prepare_routes again' do
162
+ expect ( subject ) . to_not receive ( :prepare_routes )
163
+ expect ( subject . routes ) . to eq routes
164
+ end
165
+ end
150
166
end
151
167
152
168
xdescribe '.route_param' do
You can’t perform that action at this time.
0 commit comments