File: 0003-Skip-tests-which-require-types-included-in-musterman.patch

package info (click to toggle)
ruby-mustermann 3.0.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,224 kB
  • sloc: ruby: 7,746; makefile: 6
file content (316 lines) | stat: -rw-r--r-- 18,097 bytes parent folder | download
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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
From: Lucas Kanashiro <kanashiro@ubuntu.com>
Date: Fri, 16 Sep 2022 12:25:51 -0300
Subject: Skip tests which require types included in mustermann-contrib

mustermann-contrib is not shipped, it requires new dependencies. Due to
that the following types does not work:

- rails
- shell
- simple
- template

Forwarded: not-needed

---
 mustermann/spec/composite_spec.rb  |  6 +++---
 mustermann/spec/concat_spec.rb     | 12 ++++++------
 mustermann/spec/expander_spec.rb   | 20 ++++++++++----------
 mustermann/spec/mapper_spec.rb     |  2 +-
 mustermann/spec/mustermann_spec.rb | 22 +++++++++++-----------
 mustermann/spec/pattern_spec.rb    |  6 +++---
 mustermann/spec/to_pattern_spec.rb | 18 +++++++++---------
 7 files changed, 43 insertions(+), 43 deletions(-)

--- a/mustermann/spec/composite_spec.rb
+++ b/mustermann/spec/composite_spec.rb
@@ -56,7 +56,7 @@ describe Mustermann::Composite do
       example { subject.expand(name: 'bar')                 .should be == '/foo/bar' }
       example { subject.expand(first: 'fox', second: 'bar') .should be == '/fox/bar' }
 
-      context "without expandable patterns" do
+      xcontext "without expandable patterns" do
         subject(:pattern) { Mustermann.new('/foo/:name', '/:first/:second', type: :simple) }
         example { subject.should_not respond_to(:expand) }
         example { expect { subject.expand(name: 'bar') }.to raise_error(NotImplementedError) }
@@ -67,7 +67,7 @@ describe Mustermann::Composite do
       example { should respond_to(:to_templates) }
       example { should generate_templates('/foo/{name}', '/{first}/{second}') }
 
-      context "without patterns implementing to_templates" do
+      xcontext "without patterns implementing to_templates" do
         subject(:pattern) { Mustermann.new('/foo/:name', '/:first/:second', type: :simple) }
         example { should_not respond_to(:to_templates) }
         example { expect { subject.to_templates }.to raise_error(NotImplementedError) }
@@ -150,7 +150,7 @@ describe Mustermann::Composite do
     end
   end
 
-  describe :inspect do
+  xdescribe :inspect do
     let(:sinatra)  { Mustermann.new('x')                  }
     let(:shell)    { Mustermann.new('x', type: :shell)    }
     let(:identity) { Mustermann.new('x', type: :identity) }
--- a/mustermann/spec/concat_spec.rb
+++ b/mustermann/spec/concat_spec.rb
@@ -22,19 +22,19 @@ describe Mustermann::Concat do
       its(:to_s)  { should be == "foobar" }
     end
 
-    context "sinatra + rails" do
+    xcontext "sinatra + rails" do
       subject(:pattern) { Mustermann.new("/:foo") +  Mustermann.new("/:bar", type: :rails) }
       its(:class) { should be == Mustermann::Sinatra }
       its(:to_s)  { should be == "/{foo}/{bar}" }
     end
 
-    context "sinatra + flask" do
+    xcontext "sinatra + flask" do
       subject(:pattern) { Mustermann.new("/:foo") +  Mustermann.new("/<bar>", type: :flask) }
       its(:class) { should be == Mustermann::Sinatra }
       its(:to_s)  { should be == "/{foo}/{bar}" }
     end
 
-    context "sinatra + flask (typed)" do
+    xcontext "sinatra + flask (typed)" do
       subject(:pattern) { Mustermann.new("/:foo") +  Mustermann.new("/<int:bar>", type: :flask) }
       its(:class) { should be == Mustermann::Concat }
       its(:to_s)  { should be == '(sinatra:"/:foo" + flask:"/<int:bar>")' }
@@ -46,13 +46,13 @@ describe Mustermann::Concat do
       its(:to_s)  { should be == '(sinatra:"/:foo" + sinatra:"/:bar")' }
     end
 
-    context "sinatra + rails (different options)" do
+    xcontext "sinatra + rails (different options)" do
       subject(:pattern) { Mustermann.new("/:foo") +  Mustermann.new("/:bar", type: :rails, uri_decode: false) }
       its(:class) { should be == Mustermann::Concat }
       its(:to_s)  { should be == '(sinatra:"/:foo" + rails:"/:bar")' }
     end
 
-    context "sinatra + rails (different options) + sinatra" do
+    xcontext "sinatra + rails (different options) + sinatra" do
       subject(:pattern) { Mustermann.new("/:foo") +  Mustermann.new("/:bar", type: :rails, uri_decode: false) + Mustermann.new("/:baz") }
       its(:class) { should be == Mustermann::Concat }
       its(:to_s)  { should be == '(sinatra:"/:foo" + rails:"/:bar" + sinatra:"/:baz")' }
@@ -64,7 +64,7 @@ describe Mustermann::Concat do
       its(:to_s)  { should be == '(sinatra:"/foo/bar" + regular:"baz")' }
     end
 
-    context "sinatra + (sinatra + rails (different options) + sinatra)" do
+    xcontext "sinatra + (sinatra + rails (different options) + sinatra)" do
       subject(:pattern) { Mustermann.new("/foo") + (Mustermann.new("/bar") + Mustermann.new("/baz", type: :rails, uri_decode: false) + Mustermann.new("/boo")) }
       its(:class) { should be == Mustermann::Concat }
       its(:to_s)  { should be == '(sinatra:"/foo/bar" + rails:"/baz" + sinatra:"/boo")' }
--- a/mustermann/spec/expander_spec.rb
+++ b/mustermann/spec/expander_spec.rb
@@ -14,13 +14,13 @@ describe Mustermann::Expander do
     expander.expand(foo: 23).should be == "/23"
   end
 
-  it 'supports setting pattern options' do
+  xit 'supports setting pattern options' do
     expander = Mustermann::Expander.new(type: :rails) << "/:foo(.:ext)" << "/:bar"
     expander.expand(foo: 42, ext: 'jpg').should be == "/42.jpg"
     expander.expand(foo: 42).should be == "/42"
   end
 
-  it 'supports combining different pattern styles' do
+  xit 'supports combining different pattern styles' do
     expander = Mustermann::Expander.new << Mustermann.new("/:foo(.:ext)", type: :rails) << Mustermann.new("/:bar", type: :sinatra)
     expander.expand(foo: 'pony', ext: 'jpg').should be == '/pony.jpg'
     expander.expand(bar: 23).should be == "/23"
@@ -96,28 +96,28 @@ describe Mustermann::Expander do
   describe :== do
     example { Mustermann::Expander.new('/foo')               .should     be == Mustermann::Expander.new('/foo') }
     example { Mustermann::Expander.new('/foo')               .should_not be == Mustermann::Expander.new('/bar') }
-    example { Mustermann::Expander.new('/foo', type: :rails) .should     be == Mustermann::Expander.new('/foo', type: :rails) }
-    example { Mustermann::Expander.new('/foo', type: :rails) .should_not be == Mustermann::Expander.new('/foo', type: :sinatra) }
+    xexample { Mustermann::Expander.new('/foo', type: :rails) .should     be == Mustermann::Expander.new('/foo', type: :rails) }
+    xexample { Mustermann::Expander.new('/foo', type: :rails) .should_not be == Mustermann::Expander.new('/foo', type: :sinatra) }
   end
 
   describe :hash do
     example { Mustermann::Expander.new('/foo')               .hash.should     be == Mustermann::Expander.new('/foo').hash }
     example { Mustermann::Expander.new('/foo')               .hash.should_not be == Mustermann::Expander.new('/bar').hash }
-    example { Mustermann::Expander.new('/foo', type: :rails) .hash.should     be == Mustermann::Expander.new('/foo', type: :rails).hash }
-    example { Mustermann::Expander.new('/foo', type: :rails) .hash.should_not be == Mustermann::Expander.new('/foo', type: :sinatra).hash }
+    xexample { Mustermann::Expander.new('/foo', type: :rails) .hash.should     be == Mustermann::Expander.new('/foo', type: :rails).hash }
+    xexample { Mustermann::Expander.new('/foo', type: :rails) .hash.should_not be == Mustermann::Expander.new('/foo', type: :sinatra).hash }
   end
 
   describe :eql? do
     example { Mustermann::Expander.new('/foo')               .should     be_eql Mustermann::Expander.new('/foo') }
     example { Mustermann::Expander.new('/foo')               .should_not be_eql Mustermann::Expander.new('/bar') }
-    example { Mustermann::Expander.new('/foo', type: :rails) .should     be_eql Mustermann::Expander.new('/foo', type: :rails) }
-    example { Mustermann::Expander.new('/foo', type: :rails) .should_not be_eql Mustermann::Expander.new('/foo', type: :sinatra) }
+    xexample { Mustermann::Expander.new('/foo', type: :rails) .should     be_eql Mustermann::Expander.new('/foo', type: :rails) }
+    xexample { Mustermann::Expander.new('/foo', type: :rails) .should_not be_eql Mustermann::Expander.new('/foo', type: :sinatra) }
   end
 
   describe :equal? do
     example { Mustermann::Expander.new('/foo')               .should_not be_equal Mustermann::Expander.new('/foo') }
     example { Mustermann::Expander.new('/foo')               .should_not be_equal Mustermann::Expander.new('/bar') }
-    example { Mustermann::Expander.new('/foo', type: :rails) .should_not be_equal Mustermann::Expander.new('/foo', type: :rails) }
-    example { Mustermann::Expander.new('/foo', type: :rails) .should_not be_equal Mustermann::Expander.new('/foo', type: :sinatra) }
+    xexample { Mustermann::Expander.new('/foo', type: :rails) .should_not be_equal Mustermann::Expander.new('/foo', type: :rails) }
+    xexample { Mustermann::Expander.new('/foo', type: :rails) .should_not be_equal Mustermann::Expander.new('/foo', type: :sinatra) }
   end
 end
--- a/mustermann/spec/mapper_spec.rb
+++ b/mustermann/spec/mapper_spec.rb
@@ -25,7 +25,7 @@ describe Mustermann::Mapper do
       example { mapper['/fox'].should be == '/fox' }
     end
 
-    context 'allows specifying type' do
+    xcontext 'allows specifying type' do
       subject(:mapper) { Mustermann::Mapper.new({ "/foo" => "/bar" }, additional_values: :raise, type: :rails) }
       its(:to_h) { should be == { Mustermann.new("/foo", type: :rails) => Mustermann::Expander.new("/bar", type: :rails) } }
       example { mapper['/foo'].should be == '/bar' }
--- a/mustermann/spec/mustermann_spec.rb
+++ b/mustermann/spec/mustermann_spec.rb
@@ -8,11 +8,11 @@ describe Mustermann do
     context "string argument" do
       example { Mustermann.new('')                  .should be_a(Mustermann::Sinatra)  }
       example { Mustermann.new('', type: :identity) .should be_a(Mustermann::Identity) }
-      example { Mustermann.new('', type: :rails)    .should be_a(Mustermann::Rails)    }
-      example { Mustermann.new('', type: :shell)    .should be_a(Mustermann::Shell)    }
+      xexample { Mustermann.new('', type: :rails)    .should be_a(Mustermann::Rails)    }
+      xexample { Mustermann.new('', type: :shell)    .should be_a(Mustermann::Shell)    }
       example { Mustermann.new('', type: :sinatra)  .should be_a(Mustermann::Sinatra)  }
-      example { Mustermann.new('', type: :simple)   .should be_a(Mustermann::Simple)   }
-      example { Mustermann.new('', type: :template) .should be_a(Mustermann::Template) }
+      xexample { Mustermann.new('', type: :simple)   .should be_a(Mustermann::Simple)   }
+      xexample { Mustermann.new('', type: :template) .should be_a(Mustermann::Template) }
 
       example { expect { Mustermann.new('', foo:  :bar) }.to raise_error(ArgumentError, "unsupported option :foo for Mustermann::Sinatra") }
       example { expect { Mustermann.new('', type: :ast) }.to raise_error(ArgumentError, "unsupported type :ast (cannot load such file -- mustermann/ast)") }
@@ -21,18 +21,18 @@ describe Mustermann do
     context "pattern argument" do
       subject(:pattern) { Mustermann.new('') }
       example { Mustermann.new(pattern).should be == pattern }
-      example { Mustermann.new(pattern, type: :rails).should be_a(Mustermann::Sinatra) }
+      xexample { Mustermann.new(pattern, type: :rails).should be_a(Mustermann::Sinatra) }
     end
 
     context "regexp argument" do
       example { Mustermann.new(//)               .should be_a(Mustermann::Regular) }
-      example { Mustermann.new(//, type: :rails) .should be_a(Mustermann::Regular) }
+      xexample { Mustermann.new(//, type: :rails) .should be_a(Mustermann::Regular) }
     end
 
     context "argument implementing #to_pattern" do
       subject(:pattern) { Class.new { def to_pattern(**o) Mustermann.new('foo', **o) end }.new }
       example { Mustermann.new(pattern)               .should be_a(Mustermann::Sinatra) }
-      example { Mustermann.new(pattern, type: :rails) .should be_a(Mustermann::Rails) }
+      xexample { Mustermann.new(pattern, type: :rails) .should be_a(Mustermann::Rails) }
       example { Mustermann.new(pattern).to_s.should be == 'foo' }
     end
 
@@ -56,11 +56,11 @@ describe Mustermann do
 
   describe :[] do
     example { Mustermann[:identity] .should be == Mustermann::Identity }
-    example { Mustermann[:rails]    .should be == Mustermann::Rails    }
-    example { Mustermann[:shell]    .should be == Mustermann::Shell    }
+    xexample { Mustermann[:rails]    .should be == Mustermann::Rails    }
+    xexample { Mustermann[:shell]    .should be == Mustermann::Shell    }
     example { Mustermann[:sinatra]  .should be == Mustermann::Sinatra  }
-    example { Mustermann[:simple]   .should be == Mustermann::Simple   }
-    example { Mustermann[:template] .should be == Mustermann::Template }
+    xexample { Mustermann[:simple]   .should be == Mustermann::Simple   }
+    xexample { Mustermann[:template] .should be == Mustermann::Template }
 
     example { expect { Mustermann[:ast]      }.to raise_error(ArgumentError, "unsupported type :ast (cannot load such file -- mustermann/ast)") }
     example { expect { Mustermann[:expander] }.to raise_error(ArgumentError, "unsupported type :expander") }
--- a/mustermann/spec/pattern_spec.rb
+++ b/mustermann/spec/pattern_spec.rb
@@ -34,20 +34,20 @@ describe Mustermann::Pattern do
     example { Mustermann::Pattern.new('/foo') .should     be == Mustermann::Pattern.new('/foo') }
     example { Mustermann::Pattern.new('/foo') .should_not be == Mustermann::Pattern.new('/bar') }
     example { Mustermann::Sinatra.new('/foo') .should     be == Mustermann::Sinatra.new('/foo') }
-    example { Mustermann::Rails.new('/foo')   .should_not be == Mustermann::Sinatra.new('/foo') }
+    xexample { Mustermann::Rails.new('/foo')   .should_not be == Mustermann::Sinatra.new('/foo') }
   end
 
   describe :eql? do
     example { Mustermann::Pattern.new('/foo') .should     be_eql Mustermann::Pattern.new('/foo') }
     example { Mustermann::Pattern.new('/foo') .should_not be_eql Mustermann::Pattern.new('/bar') }
     example { Mustermann::Sinatra.new('/foo') .should     be_eql Mustermann::Sinatra.new('/foo') }
-    example { Mustermann::Rails.new('/foo')   .should_not be_eql Mustermann::Sinatra.new('/foo') }
+    xexample { Mustermann::Rails.new('/foo')   .should_not be_eql Mustermann::Sinatra.new('/foo') }
   end
 
   describe :equal? do
     example { Mustermann::Pattern.new('/foo') .should     be_equal Mustermann::Pattern.new('/foo') }
     example { Mustermann::Pattern.new('/foo') .should_not be_equal Mustermann::Pattern.new('/bar') }
     example { Mustermann::Sinatra.new('/foo') .should     be_equal Mustermann::Sinatra.new('/foo') }
-    example { Mustermann::Rails.new('/foo')   .should_not be_equal Mustermann::Sinatra.new('/foo') }
+    xexample { Mustermann::Rails.new('/foo')   .should_not be_equal Mustermann::Sinatra.new('/foo') }
   end
 end
--- a/mustermann/spec/to_pattern_spec.rb
+++ b/mustermann/spec/to_pattern_spec.rb
@@ -6,28 +6,28 @@ require 'delegate'
 describe Mustermann::ToPattern do
   context String do
     example { "".to_pattern               .should be_a(Mustermann::Sinatra) }
-    example { "".to_pattern(type: :rails) .should be_a(Mustermann::Rails)   }
+    xexample { "".to_pattern(type: :rails) .should be_a(Mustermann::Rails)   }
   end
 
   context Regexp do
     example { //.to_pattern               .should be_a(Mustermann::Regular) }
-    example { //.to_pattern(type: :rails) .should be_a(Mustermann::Regular) }
+    xexample { //.to_pattern(type: :rails) .should be_a(Mustermann::Regular) }
   end
 
   context Symbol do
     example { :foo.to_pattern               .should be_a(Mustermann::Sinatra) }
-    example { :foo.to_pattern(type: :rails) .should be_a(Mustermann::Sinatra) }
+    xexample { :foo.to_pattern(type: :rails) .should be_a(Mustermann::Sinatra) }
   end
 
   context Array do
     example { [:foo, :bar].to_pattern               .should be_a(Mustermann::Composite) }
-    example { [:foo, :bar].to_pattern(type: :rails) .should be_a(Mustermann::Composite) }
+    xexample { [:foo, :bar].to_pattern(type: :rails) .should be_a(Mustermann::Composite) }
   end
 
   context Mustermann::Pattern do
     subject(:pattern) { Mustermann.new('') }
     example { pattern.to_pattern.should be == pattern }
-    example { pattern.to_pattern(type: :rails).should be_a(Mustermann::Sinatra) }
+    xexample { pattern.to_pattern(type: :rails).should be_a(Mustermann::Sinatra) }
   end
 
   context 'custom class' do
@@ -41,9 +41,9 @@ describe Mustermann::ToPattern do
     end
 
     example { example_class.new.to_pattern                    .should be_a(Mustermann::Sinatra) }
-    example { example_class.new.to_pattern(type: :rails)      .should be_a(Mustermann::Rails)   }
+    xexample { example_class.new.to_pattern(type: :rails)      .should be_a(Mustermann::Rails)   }
     example { Mustermann.new(example_class.new)               .should be_a(Mustermann::Sinatra) }
-    example { Mustermann.new(example_class.new, type: :rails) .should be_a(Mustermann::Rails)   }
+    xexample { Mustermann.new(example_class.new, type: :rails) .should be_a(Mustermann::Rails)   }
   end
 
   context 'primitive delegate' do
@@ -54,7 +54,7 @@ describe Mustermann::ToPattern do
     end
 
     example { example_class.new([:foo, :bar]).to_pattern               .should be_a(Mustermann::Composite) }
-    example { example_class.new([:foo, :bar]).to_pattern(type: :rails) .should be_a(Mustermann::Composite) }
+    xexample { example_class.new([:foo, :bar]).to_pattern(type: :rails) .should be_a(Mustermann::Composite) }
   end
 
   context 'primitive subclass' do
@@ -65,6 +65,6 @@ describe Mustermann::ToPattern do
     end
 
     example { example_class.new([:foo, :bar]).to_pattern               .should be_a(Mustermann::Composite) }
-    example { example_class.new([:foo, :bar]).to_pattern(type: :rails) .should be_a(Mustermann::Composite) }
+    xexample { example_class.new([:foo, :bar]).to_pattern(type: :rails) .should be_a(Mustermann::Composite) }
   end
 end