File: 0003-Convert-test-suite-to-RSpec-3.patch

package info (click to toggle)
ruby-text-table 1.2.4-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 272 kB
  • sloc: ruby: 805; makefile: 5
file content (730 lines) | stat: -rw-r--r-- 21,655 bytes parent folder | download | duplicates (3)
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
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
From: Antonio Terceiro <terceiro@softwarelivre.org>
Date: Tue, 15 Nov 2016 18:58:15 -0300
Subject: Convert test suite to RSpec 3

---
 spec/cell_spec.rb                     |  8 +++---
 spec/enumerable_spec.rb               | 28 ++++++++++----------
 spec/integration/alignment_spec.rb    | 46 ++++++++++++++++-----------------
 spec/integration/boundaries_spec.rb   | 24 +++++++++---------
 spec/integration/column_spans_spec.rb | 48 +++++++++++++++++------------------
 spec/integration/parts_spec.rb        | 20 +++++++--------
 spec/integration/performance_spec.rb  |  2 +-
 text-table.gemspec                    |  2 +-
 8 files changed, 89 insertions(+), 89 deletions(-)

diff --git a/spec/cell_spec.rb b/spec/cell_spec.rb
index ae9f7e0..0a4f430 100644
--- a/spec/cell_spec.rb
+++ b/spec/cell_spec.rb
@@ -7,7 +7,7 @@ describe Text::Table::Cell do
   end
 
   it "should be left justified by default" do
-    @cell.align.should == :left
+    expect(@cell.align).to eq(:left)
   end
 
   it "should span 1 column by default" do
@@ -15,9 +15,9 @@ describe Text::Table::Cell do
   end
 
   it "should return correct column index" do
-    @table.text_table_rows.first.cells[0].column_index.should == 0
-    @table.text_table_rows.first.cells[1].column_index.should == 1
-    @table.text_table_rows.first.cells[2].column_index.should == 3
+    expect(@table.text_table_rows.first.cells[0].column_index).to eq(0)
+    expect(@table.text_table_rows.first.cells[1].column_index).to eq(1)
+    expect(@table.text_table_rows.first.cells[2].column_index).to eq(3)
   end
 
 end
diff --git a/spec/enumerable_spec.rb b/spec/enumerable_spec.rb
index 9bcae8d..2c7cf0a 100644
--- a/spec/enumerable_spec.rb
+++ b/spec/enumerable_spec.rb
@@ -11,45 +11,45 @@ describe Enumerable do
     end
 
     it "to Text::Table" do
-      @arr.to_text_table.to_s.should == deindent(%q{
+      expect(@arr.to_text_table.to_s).to eq(deindent(%q{
         +----+-----+------+
         | 11 | 2   | 3333 |
         | 44 | 56  | 6    |
         | 7  | 888 | 99   |
         +----+-----+------+
-      })
+      }))
     end
 
     it "to Text::Table using flat array" do
-      [11, 44, 7].to_text_table.to_s.should == deindent(%q{
+      expect([11, 44, 7].to_text_table.to_s).to eq(deindent(%q{
         +----+
         | 11 |
         | 44 |
         | 7  |
         +----+
-      })
+      }))
     end
 
     it "to Text::Table, setting first row as head" do
-      @arr.to_text_table(:first_row_is_head => true).to_s.should == deindent(%q{
+      expect(@arr.to_text_table(:first_row_is_head => true).to_s).to eq(deindent(%q{
         +----+-----+------+
         | 11 |  2  | 3333 |
         +----+-----+------+
         | 44 | 56  | 6    |
         | 7  | 888 | 99   |
         +----+-----+------+
-      })
+      }))
     end
 
     it "to Text::Table, setting last row as foot" do
-      @arr.to_text_table(:last_row_is_foot => true).to_s.should == deindent(%q{
+      expect(@arr.to_text_table(:last_row_is_foot => true).to_s).to eq(deindent(%q{
         +----+-----+------+
         | 11 | 2   | 3333 |
         | 44 | 56  | 6    |
         +----+-----+------+
         | 7  | 888 | 99   |
         +----+-----+------+
-      })
+      }))
     end
   end
 
@@ -61,32 +61,32 @@ describe Enumerable do
       }
     end
     it "to Text::Table" do
-      @hsh.to_text_table.to_s.should == deindent(%q{
+      expect(@hsh.to_text_table.to_s).to eq(deindent(%q{
         +---+----+
         | k | vv |
         | k | vv |
         +---+----+
-      })
+      }))
     end
 
     it "to Text::Table, setting first row as head" do
-      @hsh.to_text_table(:first_row_is_head => true).to_s.should == deindent(%q{
+      expect(@hsh.to_text_table(:first_row_is_head => true).to_s).to eq(deindent(%q{
         +---+----+
         | k | vv |
         +---+----+
         | k | vv |
         +---+----+
-      })
+      }))
     end
 
     it "to Text::Table, setting last row as foot" do
-      @hsh.to_text_table(:last_row_is_foot => true).to_s.should == deindent(%q{
+      expect(@hsh.to_text_table(:last_row_is_foot => true).to_s).to eq(deindent(%q{
         +---+----+
         | k | vv |
         +---+----+
         | k | vv |
         +---+----+
-      })
+      }))
     end
   end
 end
diff --git a/spec/integration/alignment_spec.rb b/spec/integration/alignment_spec.rb
index 12c8e16..84521b0 100644
--- a/spec/integration/alignment_spec.rb
+++ b/spec/integration/alignment_spec.rb
@@ -14,40 +14,40 @@ describe Text::Table do
     context 'when left' do
       let(:align) { :left }
 
-      it { should == deindent(%q{
+      it { is_expected.to eq(deindent(%q{
         +-----+------+------+------+
         | a   | bb   | ccc  | dddd |
         +-----+------+------+------+
         | aa  | bbb  | cccc | d    |
         | aaa | bbbb | c    | dd   |
         +-----+------+------+------+
-      }) }
+      })) }
     end
 
     context 'when center' do
       let(:align) { :center }
 
-      it { should == deindent(%q{
+      it { is_expected.to eq(deindent(%q{
         +-----+------+------+------+
         |  a  |  bb  | ccc  | dddd |
         +-----+------+------+------+
         | aa  | bbb  | cccc | d    |
         | aaa | bbbb | c    | dd   |
         +-----+------+------+------+
-      }) }
+      })) }
     end
 
     context 'when right' do
       let(:align) { :right }
 
-      it { should == deindent(%q{
+      it { is_expected.to eq(deindent(%q{
         +-----+------+------+------+
         |   a |   bb |  ccc | dddd |
         +-----+------+------+------+
         | aa  | bbb  | cccc | d    |
         | aaa | bbbb | c    | dd   |
         +-----+------+------+------+
-      }) }
+      })) }
     end
   end
 
@@ -57,7 +57,7 @@ describe Text::Table do
     context 'when left' do
       let(:align) { :left }
 
-      it { should == deindent(%q{
+      it { is_expected.to eq(deindent(%q{
         +------+------+------+------+
         |  a   |  bb  | ccc  | dddd |
         +------+------+------+------+
@@ -66,13 +66,13 @@ describe Text::Table do
         +------+------+------+------+
         | aaaa | b    | cc   | ddd  |
         +------+------+------+------+
-      }) }
+      })) }
     end
 
     context 'when center' do
       let(:align) { :center }
 
-      it { should == deindent(%q{
+      it { is_expected.to eq(deindent(%q{
         +------+------+------+------+
         |  a   |  bb  | ccc  | dddd |
         +------+------+------+------+
@@ -81,13 +81,13 @@ describe Text::Table do
         +------+------+------+------+
         | aaaa | b    | cc   | ddd  |
         +------+------+------+------+
-      }) }
+      })) }
     end
 
     context 'when right' do
       let(:align) { :right }
 
-      it { should == deindent(%q{
+      it { is_expected.to eq(deindent(%q{
         +------+------+------+------+
         |  a   |  bb  | ccc  | dddd |
         +------+------+------+------+
@@ -96,7 +96,7 @@ describe Text::Table do
         +------+------+------+------+
         | aaaa | b    | cc   | ddd  |
         +------+------+------+------+
-      }) }
+      })) }
     end
   end
 
@@ -107,40 +107,40 @@ describe Text::Table do
     context 'when left' do
       let(:align) { :left }
 
-      it { should == deindent(%q{
+      it { is_expected.to eq(deindent(%q{
         +------+------+------+-----+
         | aa   | bbb  | cccc | d   |
         | aaa  | bbbb | c    | dd  |
         +------+------+------+-----+
         | aaaa | b    | cc   | ddd |
         +------+------+------+-----+
-      }) }
+      })) }
     end
 
     context 'when center' do
       let(:align) { :center }
 
-      it { should == deindent(%q{
+      it { is_expected.to eq(deindent(%q{
         +------+------+------+-----+
         | aa   | bbb  | cccc | d   |
         | aaa  | bbbb | c    | dd  |
         +------+------+------+-----+
         | aaaa |  b   |  cc  | ddd |
         +------+------+------+-----+
-      }) }
+      })) }
     end
 
     context 'when right' do
       let(:align) { :right }
 
-      it { should == deindent(%q{
+      it { is_expected.to eq(deindent(%q{
         +------+------+------+-----+
         | aa   | bbb  | cccc | d   |
         | aaa  | bbbb | c    | dd  |
         +------+------+------+-----+
         | aaaa |    b |   cc | ddd |
         +------+------+------+-----+
-      }) }
+      })) }
     end
   end
 
@@ -155,7 +155,7 @@ describe Text::Table do
         table.align_column 3, :right
       end
 
-      it { should == deindent(%q{
+      it { is_expected.to eq(deindent(%q{
         +------+------+------+------+
         |  a   |  bb  | ccc  | dddd |
         +------+------+------+------+
@@ -167,19 +167,19 @@ describe Text::Table do
         +------+------+------+------+
         | aaaa |    b |   cc | ddd  |
         +------+------+------+------+
-      }) }
+      })) }
     end
 
     context 'of rows' do
-      pending
+      skip
     end
 
     context 'of headers' do
-      pending
+      skip
     end
 
     context 'of footers' do
-      pending
+      skip
     end
   end
 end
diff --git a/spec/integration/boundaries_spec.rb b/spec/integration/boundaries_spec.rb
index 2287f2b..6d61929 100644
--- a/spec/integration/boundaries_spec.rb
+++ b/spec/integration/boundaries_spec.rb
@@ -16,7 +16,7 @@ describe Text::Table do
     context 'when ":"' do
       let(:horizontal_boundary) { ':' }
 
-      it { should == deindent(%q{
+      it { is_expected.to eq(deindent(%q{
         +------+------+------+------+
         :  a   :  bb  : ccc  : dddd :
         +------+------+------+------+
@@ -25,14 +25,14 @@ describe Text::Table do
         +------+------+------+------+
         : aaaa : b    : cc   : ddd  :
         +------+------+------+------+
-      }) }
+      })) }
     end
 
     context 'when "||" and boundary intersection is "++"' do
       let(:horizontal_boundary) { '||' }
       let(:boundary_intersection) { '++' }
 
-      it { should == deindent(%q{
+      it { is_expected.to eq(deindent(%q{
         ++------++------++------++------++
         ||  a   ||  bb  || ccc  || dddd ||
         ++------++------++------++------++
@@ -41,7 +41,7 @@ describe Text::Table do
         ++------++------++------++------++
         || aaaa || b    || cc   || ddd  ||
         ++------++------++------++------++
-      }) }
+      })) }
 
       context 'with spanned cells' do
         before do
@@ -49,7 +49,7 @@ describe Text::Table do
           table.rows << [{ :value => 'x', :colspan => 2, :align => :right }, 'c', 'd']
         end
 
-        it { should == deindent(%q{
+        it { is_expected.to eq(deindent(%q{
           ++------++------++------++------++
           ||  a   ||  bb  || ccc  || dddd ||
           ++------++------++------++------++
@@ -60,7 +60,7 @@ describe Text::Table do
           ++------++------++------++------++
           || aaaa || b    || cc   || ddd  ||
           ++------++------++------++------++
-        }) }
+        })) }
       end
 
     end
@@ -69,7 +69,7 @@ describe Text::Table do
   describe 'vertical boundaries when "="' do
     let(:vertical_boundary) { '=' }
 
-    it { should == deindent(%q{
+    it { is_expected.to eq(deindent(%q{
       +======+======+======+======+
       |  a   |  bb  | ccc  | dddd |
       +======+======+======+======+
@@ -78,13 +78,13 @@ describe Text::Table do
       +======+======+======+======+
       | aaaa | b    | cc   | ddd  |
       +======+======+======+======+
-    }) }
+    })) }
   end
 
   describe 'boundary intersections when "*"' do
     let(:boundary_intersection) { '*' }
 
-    it { should == deindent(%q{
+    it { is_expected.to eq(deindent(%q{
         *------*------*------*------*
         |  a   |  bb  | ccc  | dddd |
         *------*------*------*------*
@@ -93,13 +93,13 @@ describe Text::Table do
         *------*------*------*------*
         | aaaa | b    | cc   | ddd  |
         *------*------*------*------*
-    }) }
+    })) }
   end
 
   describe 'horizantal padding when 3 spaces' do
     let(:horizontal_padding) { 3 }
 
-    it { should == deindent(%q{
+    it { is_expected.to eq(deindent(%q{
       +----------+----------+----------+----------+
       |    a     |    bb    |   ccc    |   dddd   |
       +----------+----------+----------+----------+
@@ -108,6 +108,6 @@ describe Text::Table do
       +----------+----------+----------+----------+
       |   aaaa   |   b      |   cc     |   ddd    |
       +----------+----------+----------+----------+
-    }) }
+    })) }
   end
 end
diff --git a/spec/integration/column_spans_spec.rb b/spec/integration/column_spans_spec.rb
index bdfbe11..4d71ca8 100644
--- a/spec/integration/column_spans_spec.rb
+++ b/spec/integration/column_spans_spec.rb
@@ -13,7 +13,7 @@ describe Text::Table do
       context 'aligned to the left' do
         let(:align) { :left }
 
-        it { should == deindent(%q{
+        it { is_expected.to eq(deindent(%q{
           +------+------+------+------+
           |  a   |  bb  | ccc  | dddd |
           +------+------+------+------+
@@ -23,13 +23,13 @@ describe Text::Table do
           +------+------+------+------+
           | aaaa | b    | cc   | ddd  |
           +------+------+------+------+
-        }) }
+        })) }
       end
 
       context 'center aligned' do
         let(:align) { :center }
 
-        it { should == deindent(%q{
+        it { is_expected.to eq(deindent(%q{
           +------+------+------+------+
           |  a   |  bb  | ccc  | dddd |
           +------+------+------+------+
@@ -39,13 +39,13 @@ describe Text::Table do
           +------+------+------+------+
           | aaaa | b    | cc   | ddd  |
           +------+------+------+------+
-        }) }
+        })) }
       end
 
       context 'aligned to the right' do
         let(:align) { :right }
 
-        it { should == deindent(%q{
+        it { is_expected.to eq(deindent(%q{
           +------+------+------+------+
           |  a   |  bb  | ccc  | dddd |
           +------+------+------+------+
@@ -55,7 +55,7 @@ describe Text::Table do
           +------+------+------+------+
           | aaaa | b    | cc   | ddd  |
           +------+------+------+------+
-        }) }
+        })) }
       end
     end
 
@@ -67,7 +67,7 @@ describe Text::Table do
       context 'aligned to the left' do
         let(:align) { :left }
 
-        it { should == deindent(%q{
+        it { is_expected.to eq(deindent(%q{
           +------+------+------+------+
           |  a   |  bb  | ccc  | dddd |
           +------+------+------+------+
@@ -77,13 +77,13 @@ describe Text::Table do
           +------+------+------+------+
           | aaaa | b    | cc   | ddd  |
           +------+------+------+------+
-        }) }
+        })) }
       end
 
       context 'center aligned' do
         let(:align) { :center }
 
-        it { should == deindent(%q{
+        it { is_expected.to eq(deindent(%q{
           +------+------+------+------+
           |  a   |  bb  | ccc  | dddd |
           +------+------+------+------+
@@ -93,13 +93,13 @@ describe Text::Table do
           +------+------+------+------+
           | aaaa | b    | cc   | ddd  |
           +------+------+------+------+
-        }) }
+        })) }
       end
 
       context 'aligned to the right' do
         let(:align) { :right }
 
-        it { should == deindent(%q{
+        it { is_expected.to eq(deindent(%q{
           +------+------+------+------+
           |  a   |  bb  | ccc  | dddd |
           +------+------+------+------+
@@ -109,7 +109,7 @@ describe Text::Table do
           +------+------+------+------+
           | aaaa | b    | cc   | ddd  |
           +------+------+------+------+
-        }) }
+        })) }
       end
     end
   end
@@ -123,7 +123,7 @@ describe Text::Table do
       context 'aligned to the left' do
         let(:align) { :left }
 
-        it { should == deindent(%q{
+        it { is_expected.to eq(deindent(%q{
           +------+------+------+------+
           |  a   |  bb  | ccc  | dddd |
           +------+------+------+------+
@@ -133,13 +133,13 @@ describe Text::Table do
           +------+------+------+------+
           | aaaa | b    | cc   | ddd  |
           +------+------+------+------+
-        }) }
+        })) }
       end
 
       context 'center aligned' do
         let(:align) { :center }
 
-        it { should == deindent(%q{
+        it { is_expected.to eq(deindent(%q{
           +------+------+------+------+
           |  a   |  bb  | ccc  | dddd |
           +------+------+------+------+
@@ -149,13 +149,13 @@ describe Text::Table do
           +------+------+------+------+
           | aaaa | b    | cc   | ddd  |
           +------+------+------+------+
-        }) }
+        })) }
       end
 
       context 'aligned to the right' do
         let(:align) { :right }
 
-        it { should == deindent(%q{
+        it { is_expected.to eq(deindent(%q{
           +------+------+------+------+
           |  a   |  bb  | ccc  | dddd |
           +------+------+------+------+
@@ -165,7 +165,7 @@ describe Text::Table do
           +------+------+------+------+
           | aaaa | b    | cc   | ddd  |
           +------+------+------+------+
-        }) }
+        })) }
       end
     end
 
@@ -177,7 +177,7 @@ describe Text::Table do
       context 'aligned to the left' do
         let(:align) { :left }
 
-        it { should == deindent(%q{
+        it { is_expected.to eq(deindent(%q{
           +------+------+------+------+
           |  a   |  bb  | ccc  | dddd |
           +------+------+------+------+
@@ -187,13 +187,13 @@ describe Text::Table do
           +------+------+------+------+
           | aaaa | b    | cc   | ddd  |
           +------+------+------+------+
-        }) }
+        })) }
       end
 
       context 'center aligned' do
         let(:align) { :center }
 
-        it { should == deindent(%q{
+        it { is_expected.to eq(deindent(%q{
           +------+------+------+------+
           |  a   |  bb  | ccc  | dddd |
           +------+------+------+------+
@@ -203,13 +203,13 @@ describe Text::Table do
           +------+------+------+------+
           | aaaa | b    | cc   | ddd  |
           +------+------+------+------+
-        }) }
+        })) }
       end
 
       context 'aligned to the right' do
         let(:align) { :right }
 
-        it { should == deindent(%q{
+        it { is_expected.to eq(deindent(%q{
           +------+------+------+------+
           |  a   |  bb  | ccc  | dddd |
           +------+------+------+------+
@@ -219,7 +219,7 @@ describe Text::Table do
           +------+------+------+------+
           | aaaa | b    | cc   | ddd  |
           +------+------+------+------+
-        }) }
+        })) }
       end
     end
   end
diff --git a/spec/integration/parts_spec.rb b/spec/integration/parts_spec.rb
index 443aeeb..7dcc0cf 100644
--- a/spec/integration/parts_spec.rb
+++ b/spec/integration/parts_spec.rb
@@ -8,61 +8,61 @@ describe Text::Table do
   subject { table.to_s }
 
   describe 'rows' do
-    it { should == deindent(%q{
+    it { is_expected.to eq(deindent(%q{
       +-----+------+------+----+
       | aa  | bbb  | cccc | d  |
       | aaa | bbbb | c    | dd |
       +-----+------+------+----+
-    }) }
+    })) }
 
     context 'when nothing is passed into the contructor' do
       let(:rows) { nil }
 
       it 'is an empty array' do
-        table.rows.should == []
+        expect(table.rows).to eq([])
       end
     end
 
     context 'with unequal number of cells' do
-      pending
+      skip
     end
   end
 
   describe 'head' do
     let(:head) { @head }
 
-    it { should == deindent(%q{
+    it { is_expected.to eq(deindent(%q{
       +-----+------+------+------+
       |  a  |  bb  | ccc  | dddd |
       +-----+------+------+------+
       | aa  | bbb  | cccc | d    |
       | aaa | bbbb | c    | dd   |
       +-----+------+------+------+
-    }) }
+    })) }
   end
 
   describe 'foot' do
     let(:foot) { @foot }
 
-    it { should == deindent(%q{
+    it { is_expected.to eq(deindent(%q{
       +------+------+------+-----+
       | aa   | bbb  | cccc | d   |
       | aaa  | bbbb | c    | dd  |
       +------+------+------+-----+
       | aaaa | b    | cc   | ddd |
       +------+------+------+-----+
-    }) }
+    })) }
   end
 
   describe 'separators' do
     let(:rows) { @rows.insert(1, :separator) }
 
-    it { should == deindent(%q{
+    it { is_expected.to eq(deindent(%q{
       +-----+------+------+----+
       | aa  | bbb  | cccc | d  |
       +-----+------+------+----+
       | aaa | bbbb | c    | dd |
       +-----+------+------+----+
-    }) }
+    })) }
   end
 end
diff --git a/spec/integration/performance_spec.rb b/spec/integration/performance_spec.rb
index 19c9e5c..79c373e 100644
--- a/spec/integration/performance_spec.rb
+++ b/spec/integration/performance_spec.rb
@@ -6,7 +6,7 @@ describe Text::Table, 'performance' do
     base = time_to_render_num_of_rows  1_000
     time = time_to_render_num_of_rows 10_000
 
-    time.should_not > base * 20
+    expect(time).not_to be > base * 20
   end
 
   def time_to_render_num_of_rows(num)
diff --git a/text-table.gemspec b/text-table.gemspec
index 68e15d9..1cf4b16 100644
--- a/text-table.gemspec
+++ b/text-table.gemspec
@@ -17,6 +17,6 @@ Gem::Specification.new do |gem|
   gem.files = `git ls-files`.split($/)
   gem.test_files = `git ls-files -- spec/*`.split($/)
   gem.extra_rdoc_files = %w[LICENSE README.rdoc]
-  gem.add_development_dependency 'rspec', '~> 2'
+  gem.add_development_dependency 'rspec', '~> 3.5'
   gem.license = 'MIT'
 end