transpec 1.2.0 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e113c8ac0e1041e1b1704f1119af7e1dc57567ad
4
- data.tar.gz: 5f531ea384b0ff31c32126bf03cc88d69474c2bd
3
+ metadata.gz: f1cbae52577334b666b5a02f1c926f8a8ca1af16
4
+ data.tar.gz: 181c31e4d34c5b5f4e966d0627fb30fa9d875142
5
5
  SHA512:
6
- metadata.gz: 4dda416fa2df40afd219d2b78b0c7420c0850cec9c31d3607fec6c3623bf38a712a778c428fda819a9b1cf1d8370be8a43042e40763e299ad65fd306e5525d2a
7
- data.tar.gz: 67de6752f2ea60e243c850efa449a807be0d52cb8f4d3d25182b89c52599788f8e40b244c7f5ec20dc980b4e46634a338c37fd3989789309d7ab248ff4522c4c
6
+ metadata.gz: 1d41de85a3be6bb7e6d271c170c169358a46a8501e52023b13a1fc74df4633c5be597798359312e805666156e85119b6911d712981ca35fd1a3c8105c616f468
7
+ data.tar.gz: c0970c8ed8a6daefe39fc0bf136d54d58872255d0dfdaef1ebf4aff500fd1511e369af3c0c06f81c52153ca5cbcc29a12a884380a59256fff8f9274e4c533cf4
data/.rubocop.yml CHANGED
@@ -11,6 +11,9 @@ LineLength:
11
11
  MethodLength:
12
12
  Max: 17
13
13
 
14
+ CyclomaticComplexity:
15
+ Max: 8
16
+
14
17
  WordArray:
15
18
  Enabled: false
16
19
 
@@ -48,6 +51,10 @@ Documentation:
48
51
  IndentationWidth:
49
52
  Enabled: false
50
53
 
54
+ # TODO: This should not register offences for non keyword hashes.
55
+ BracesAroundHashParameters:
56
+ Enabled: false
57
+
51
58
  # TODO: Shorten to 100.
52
59
  ClassLength:
53
60
  Max: 150
data/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## Development
4
4
 
5
+ ## v1.2.1
6
+
7
+ * Apply `-p/--no-parentheses-matcher-arg` to the conversion of `have(n).items` (`obj.should have(n).items` is now converted to `expect(obj.size).to eq n` with `-p/--no-parentheses-matcher-arg`)
8
+
5
9
  ## v1.2.0
6
10
 
7
11
  * Transpec is now ready for RSpec 2.99 and 3.0 beta!
data/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  **Transpec** automatically converts your specs into latest [RSpec](http://rspec.info/) syntax with static and dynamic code analysis.
6
6
 
7
- This aims to facilitate smooth transition to RSpec 3, and Transpec is now ready for RSpec 2.99 and 3.0 beta!
7
+ This aims to facilitate smooth transition to RSpec 3, and is now ready for RSpec 2.99 and 3.0 beta!
8
8
 
9
9
  See the following pages for the new RSpec syntax and the plan for RSpec 3:
10
10
 
@@ -101,10 +101,14 @@ You can see actual conversion examples below:
101
101
 
102
102
  ## Installation
103
103
 
104
+ Simply install `transpec` with `gem` command:
105
+
104
106
  ```bash
105
107
  $ gem install transpec
106
108
  ```
107
109
 
110
+ Usually you don't need to add `transpec` to your `*.gemspec` or `Gemfile` since this isn't a tool to be used daily.
111
+
108
112
  ## Basic Usage
109
113
 
110
114
  Before converting your specs:
@@ -216,7 +220,7 @@ See [Supported Conversions](#supported-conversions) for more details.
216
220
 
217
221
  ### `-n/--negative-form`
218
222
 
219
- Specify negative form of `to` that is used in `expect` syntax.
223
+ Specify negative form of `to` that is used in the `expect` syntax.
220
224
  Either `not_to` or `to_not`.
221
225
  `not_to` is used by default.
222
226
 
@@ -224,11 +228,23 @@ Either `not_to` or `to_not`.
224
228
  $ transpec --negative-form to_not
225
229
  ```
226
230
 
231
+ ### `-b/--boolean-matcher`
232
+
233
+ Specify matcher type that `be_true` and `be_false` will be converted to.
234
+ Any of `truthy,falsey`, `truthy,falsy` or `true,false` can be specified.
235
+ `truthy,falsey` is used by default.
236
+
237
+ ```bash
238
+ $ transpec --boolean-matcher true,false
239
+ ```
240
+
241
+ See [Supported Conversions - Boolean matchers](#boolean-matchers) for more details.
242
+
227
243
  ### `-p/--no-parentheses-matcher-arg`
228
244
 
229
245
  Suppress parenthesizing argument of matcher when converting
230
246
  `should` with operator matcher to `expect` with non-operator matcher
231
- (`expect` syntax does not directly support the operator matchers).
247
+ (the `expect` syntax does not directly support the operator matchers).
232
248
  Note that it will be parenthesized even if this option is specified
233
249
  when parentheses are necessary to keep the meaning of the expression.
234
250
 
@@ -295,7 +311,7 @@ end
295
311
  ### Reason
296
312
 
297
313
  * `should` is defined on `BasicObject` class, so you can use `should` everywhere.
298
- * `expect` is defined on `RSpec::Matchers` module that is included by `RSpec::Core::ExampleGroup` class, so you can use `expect` only where `self` is an instance of `RSpec::Core::ExampleGroup` (i.e. in `it` blocks, `:each` hook blocks or included module methods) or other classes that include `RSpec::Matchers`.
314
+ * `expect` is defined on `RSpec::Matchers` module that is included by `RSpec::Core::ExampleGroup` class, so you can use `expect` only where `self` is an instance of `RSpec::Core::ExampleGroup` (i.e. in `it` blocks, `:each` hook blocks or included module methods) or other classes that explicitly include `RSpec::Matchers`.
299
315
 
300
316
  With the above example, in the context of `1.should == 1`, the `self` is an instance of `MyAwesomeTestRunner`.
301
317
  Transpec tracks contexts and skips conversion if the target syntax cannot be converted in a case like this.
@@ -331,7 +347,8 @@ expect(obj).not_to matcher
331
347
  expect(obj).to_not matcher # with `--negative-form to_not`
332
348
  ```
333
349
 
334
- * Disabled by: `--keep should`
350
+ * Conversion can be disabled by: `--keep should`
351
+ * Deprecation: Deprecated since RSpec 3.0
335
352
  * See also: [Myron Marston » RSpec's New Expectation Syntax](http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax)
336
353
 
337
354
  ### Operator matchers
@@ -352,6 +369,8 @@ expect('string').to match(/^str/)
352
369
  expect([1, 2, 3]).to match_array([2, 1, 3])
353
370
  ```
354
371
 
372
+ This conversion is combined with the conversion of [Standard expectations](#standard-expecatations) and cannot be disabled separately because the `expect` syntax does not directly support the operator matchers.
373
+
355
374
  * See also: [(Almost) All Matchers Are Supported - RSpec's New Expectation Syntax](http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax#almost_all_matchers_are_supported)
356
375
 
357
376
  ### Boolean matchers
@@ -384,7 +403,8 @@ expect(obj).to be false
384
403
 
385
404
  So, converting `be_true`/`be_false` to `be_truthy`/`be_falsey` never breaks your specs and this is the Transpec's default. If you are willing to test boolean values strictly, you can convert them to `be true`/`be false` with `--boolean-matcher true,false` option. Note that this may break your specs if your library codes don't return exact boolean values.
386
405
 
387
- * Disabled by: `--keep deprecated`
406
+ * Conversion can be disabled by: `--keep deprecated`
407
+ * Deprecation: Deprecated since RSpec 2.99, removed at RSpec 3.0
388
408
  * See also: [Consider renaming `be_true` and `be_false` to `be_truthy` and `be_falsey` · rspec/rspec-expectations](https://github.com/rspec/rspec-expectations/issues/283)
389
409
 
390
410
  ### `be_close` matcher
@@ -397,7 +417,8 @@ expect(1.0 / 3.0).to be_close(0.333, 0.001)
397
417
  expect(1.0 / 3.0).to be_within(0.001).of(0.333)
398
418
  ```
399
419
 
400
- * Disabled by: `--keep deprecated`
420
+ * Conversion can be disabled by: `--keep deprecated`
421
+ * Deprecation: Deprecated since RSpec 2.1, removed at RSpec 3.0
401
422
  * See also: [New be within matcher and RSpec.deprecate fix · rspec/rspec-expectations](https://github.com/rspec/rspec-expectations/pull/32)
402
423
 
403
424
  ### `have(n).items` matcher
@@ -410,6 +431,7 @@ expect(collection).to have_at_least(3).items
410
431
  expect(collection).to have_at_most(3).items
411
432
  collection.should have(3).items
412
433
 
434
+ # Assume `team` responds to #players.
413
435
  expect(team).to have(3).players
414
436
 
415
437
  # Assume #players is a private method.
@@ -430,7 +452,8 @@ expect(team.send(:players).size).to eq(3)
430
452
  There's the option to continue using `have(n).items` matcher with [rspec-collection_matchers](https://github.com/rspec/rspec-collection_matchers) that is an external gem extracted from `rspec-expectations`.
431
453
  If you choose so, disable this conversion with `--keep have_items`.
432
454
 
433
- * Disabled by: `--keep have_items`
455
+ * Conversion can be disabled by: `--keep have_items`
456
+ * Deprecation: Deprecated since RSpec 2.99, removed at RSpec 3.0
434
457
  * See also: [Expectations: have(x).items matchers will be moved into an external gem - The Plan for RSpec 3](http://myronmars.to/n/dev-blog/2013/07/the-plan-for-rspec-3#expectations__matchers_will_be_moved_into_an_external_gem)
435
458
 
436
459
  ### Expectations on block
@@ -445,7 +468,8 @@ proc { do_something }.should raise_error
445
468
  expect { do_something }.to raise_error
446
469
  ```
447
470
 
448
- * Disabled by: `--keep should`
471
+ * Conversion can be disabled by: `--keep should`
472
+ * Deprecation: Deprecated since RSpec 3.0
449
473
  * See also: [Unification of Block vs. Value Syntaxes - RSpec's New Expectation Syntax](http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax#unification_of_block_vs_value_syntaxes)
450
474
 
451
475
  ### Negative error expectations with specific error
@@ -462,7 +486,8 @@ expect { do_something }.not_to raise_error
462
486
  lambda { do_something }.should_not raise_error # with `--keep should`
463
487
  ```
464
488
 
465
- * Disabled by: `--keep deprecated`
489
+ * Conversion can be disabled by: `--keep deprecated`
490
+ * Deprecation: Deprecated since RSpec 2.14, removed at RSpec 3.0
466
491
  * See also: [Consider deprecating `expect { }.not_to raise_error(SpecificErrorClass)` · rspec/rspec-expectations](https://github.com/rspec/rspec-expectations/issues/231)
467
492
 
468
493
  ### Message expectations
@@ -477,7 +502,8 @@ expect(obj).to receive(:foo)
477
502
  expect_any_instance_of(SomeClass).to receive(:foo)
478
503
  ```
479
504
 
480
- * Disabled by: `--keep should_receive`
505
+ * Conversion can be disabled by: `--keep should_receive`
506
+ * Deprecation: Deprecated since RSpec 3.0
481
507
  * See also: [RSpec's new message expectation syntax - Tea is awesome.](http://teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/)
482
508
 
483
509
  ### Message expectations that are actually method stubs
@@ -498,7 +524,8 @@ allow_any_instance_of(SomeClass).to receive(:foo)
498
524
  SomeClass.any_instance.stub(:foo) # with `--keep stub`
499
525
  ```
500
526
 
501
- * Disabled by: `--keep deprecated`
527
+ * Conversion can be disabled by: `--keep deprecated`
528
+ * Deprecation: Deprecated since RSpec 2.14, removed at RSpec 3.0
502
529
  * See also: [Don't allow at_least(0) · rspec/rspec-mocks](https://github.com/rspec/rspec-mocks/issues/133)
503
530
 
504
531
  ### Method stubs
@@ -528,7 +555,17 @@ allow(obj).to receive_messages(:foo => 1, :bar => 2)
528
555
  allow_any_instance_of(SomeClass).to receive(:foo)
529
556
  ```
530
557
 
531
- * Disabled by: `--keep stub`
558
+ Note: `allow(obj).to receive_messages(:foo => 1, :bar => 2)` that is designed to be the replacement for `obj.stub(:foo => 1, :bar => 2)` is available from RSpec 3.0 (though [it's now being considered to be backported to RSpec 2.99](https://github.com/rspec/rspec-mocks/issues/454)). So, in [the upgrade path to RSpec 3](http://myronmars.to/n/dev-blog/2013/07/the-plan-for-rspec-3#the_upgrade_path), if you want to convert them with keeping the syntax correspondence, you need to follow these steps:
559
+
560
+ 1. Upgrade to RSpec 2.99
561
+ 2. Run `transpec --keep stub`
562
+ 3. Upgrade to RSpec 3.0
563
+ 4. Run `transpec`
564
+
565
+ Otherwise `obj.stub(:foo => 1, :bar => 2)` will be converted to two `allow(obj).to receive(...).and_return(...)` expressions on RSpec 2.99.
566
+
567
+ * Conversion can be disabled by: `--keep stub`
568
+ * Deprecation: Deprecated since RSpec 3.0
532
569
  * See also:
533
570
  * [RSpec's new message expectation syntax - Tea is awesome.](http://teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/)
534
571
  * [allow receive with multiple methods · rspec/rspec-mocks](https://github.com/rspec/rspec-mocks/issues/368)
@@ -545,7 +582,8 @@ obj.stub(:foo) # with `--keep stub`
545
582
  obj.unstub(:foo)
546
583
  ```
547
584
 
548
- * Disabled by: `--keep deprecated`
585
+ * Conversion can be disabled by: `--keep deprecated`
586
+ * Deprecation: Deprecated since RSpec 2.14, removed at RSpec 3.0
549
587
  * See also: [Consider deprecating and/or removing #stub! and #unstub! at some point · rspec/rspec-mocks](https://github.com/rspec/rspec-mocks/issues/122)
550
588
 
551
589
  ### Method stubs with deprecated specification of number of times
@@ -560,7 +598,8 @@ allow(obj).to receive(:foo)
560
598
  obj.stub(:foo) # with `--keep stub`
561
599
  ```
562
600
 
563
- * Disabled by: `--keep deprecated`
601
+ * Conversion can be disabled by: `--keep deprecated`
602
+ * Deprecation: Deprecated since RSpec 2.14, removed at RSpec 3.0
564
603
  * See also: [Don't allow at_least(0) · rspec/rspec-mocks](https://github.com/rspec/rspec-mocks/issues/133)
565
604
 
566
605
  ### Deprecated test double aliases
@@ -574,8 +613,9 @@ mock('something')
574
613
  double('something')
575
614
  ```
576
615
 
577
- * Disabled by: `--keep deprecated`
578
- * See also: [Deprecate "stub" for doubles · rspec/rspec-mocks](https://github.com/rspec/rspec-mocks/issues/214)
616
+ * Conversion can be disabled by: `--keep deprecated`
617
+ * Deprecation: Deprecated since RSpec 2.14, removed at RSpec 3.0
618
+ * See also: [myronmarston / why_double.md - Gist](https://gist.github.com/myronmarston/6576665)
579
619
 
580
620
  ### Expectations on attribute of subject with `its`
581
621
 
@@ -615,7 +655,8 @@ end
615
655
  There's the option to continue using `its` with [rspec-its](https://github.com/rspec/rspec-its) that is an external gem extracted from `rspec-core`.
616
656
  If you choose so, disable this conversion with `--keep its`.
617
657
 
618
- * Disabled by: `--keep its`
658
+ * Conversion can be disabled by: `--keep its`
659
+ * Deprecation: Deprecated since RSpec 2.99, removed at RSpec 3.0
619
660
  * See also: [Core: its will be moved into an external gem - The Plan for RSpec 3](http://myronmars.to/n/dev-blog/2013/07/the-plan-for-rspec-3#core__will_be_moved_into_an_external_gem)
620
661
 
621
662
  ## Compatibility
data/README.md.erb CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  **Transpec** automatically converts your specs into latest [RSpec](http://rspec.info/) syntax with static and dynamic code analysis.
6
6
 
7
- This aims to facilitate smooth transition to RSpec 3, and Transpec is now ready for RSpec 2.99 and 3.0 beta!
7
+ This aims to facilitate smooth transition to RSpec 3, and is now ready for RSpec 2.99 and 3.0 beta!
8
8
 
9
9
  See the following pages for the new RSpec syntax and the plan for RSpec 3:
10
10
 
@@ -74,10 +74,14 @@ You can see actual conversion examples below:
74
74
 
75
75
  ## Installation
76
76
 
77
+ Simply install `transpec` with `gem` command:
78
+
77
79
  ```bash
78
80
  $ gem install transpec
79
81
  ```
80
82
 
83
+ Usually you don't need to add `transpec` to your `*.gemspec` or `Gemfile` since this isn't a tool to be used daily.
84
+
81
85
  ## Basic Usage
82
86
 
83
87
  Before converting your specs:
@@ -207,7 +211,7 @@ See [Supported Conversions](#supported-conversions) for more details.
207
211
 
208
212
  ### `-n/--negative-form`
209
213
 
210
- Specify negative form of `to` that is used in `expect` syntax.
214
+ Specify negative form of `to` that is used in the `expect` syntax.
211
215
  Either `not_to` or `to_not`.
212
216
  `not_to` is used by default.
213
217
 
@@ -215,11 +219,23 @@ Either `not_to` or `to_not`.
215
219
  $ transpec --negative-form to_not
216
220
  ```
217
221
 
222
+ ### `-b/--boolean-matcher`
223
+
224
+ Specify matcher type that `be_true` and `be_false` will be converted to.
225
+ Any of `truthy,falsey`, `truthy,falsy` or `true,false` can be specified.
226
+ `truthy,falsey` is used by default.
227
+
228
+ ```bash
229
+ $ transpec --boolean-matcher true,false
230
+ ```
231
+
232
+ See [Supported Conversions - Boolean matchers](#boolean-matchers) for more details.
233
+
218
234
  ### `-p/--no-parentheses-matcher-arg`
219
235
 
220
236
  Suppress parenthesizing argument of matcher when converting
221
237
  `should` with operator matcher to `expect` with non-operator matcher
222
- (`expect` syntax does not directly support the operator matchers).
238
+ (the `expect` syntax does not directly support the operator matchers).
223
239
  Note that it will be parenthesized even if this option is specified
224
240
  when parentheses are necessary to keep the meaning of the expression.
225
241
 
@@ -291,7 +307,7 @@ end
291
307
  ### Reason
292
308
 
293
309
  * `should` is defined on `BasicObject` class, so you can use `should` everywhere.
294
- * `expect` is defined on `RSpec::Matchers` module that is included by `RSpec::Core::ExampleGroup` class, so you can use `expect` only where `self` is an instance of `RSpec::Core::ExampleGroup` (i.e. in `it` blocks, `:each` hook blocks or included module methods) or other classes that include `RSpec::Matchers`.
310
+ * `expect` is defined on `RSpec::Matchers` module that is included by `RSpec::Core::ExampleGroup` class, so you can use `expect` only where `self` is an instance of `RSpec::Core::ExampleGroup` (i.e. in `it` blocks, `:each` hook blocks or included module methods) or other classes that explicitly include `RSpec::Matchers`.
295
311
 
296
312
  With the above example, in the context of `1.should == 1`, the `self` is an instance of `MyAwesomeTestRunner`.
297
313
  Transpec tracks contexts and skips conversion if the target syntax cannot be converted in a case like this.
@@ -327,7 +343,8 @@ expect(obj).not_to matcher
327
343
  expect(obj).to_not matcher # with `--negative-form to_not`
328
344
  ```
329
345
 
330
- * Disabled by: `--keep should`
346
+ * Conversion can be disabled by: `--keep should`
347
+ * Deprecation: Deprecated since RSpec 3.0
331
348
  * See also: [Myron Marston » RSpec's New Expectation Syntax](http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax)
332
349
 
333
350
  ### Operator matchers
@@ -348,6 +365,8 @@ expect('string').to match(/^str/)
348
365
  expect([1, 2, 3]).to match_array([2, 1, 3])
349
366
  ```
350
367
 
368
+ This conversion is combined with the conversion of [Standard expectations](#standard-expecatations) and cannot be disabled separately because the `expect` syntax does not directly support the operator matchers.
369
+
351
370
  * See also: [(Almost) All Matchers Are Supported - RSpec's New Expectation Syntax](http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax#almost_all_matchers_are_supported)
352
371
 
353
372
  ### Boolean matchers
@@ -380,7 +399,8 @@ expect(obj).to be false
380
399
 
381
400
  So, converting `be_true`/`be_false` to `be_truthy`/`be_falsey` never breaks your specs and this is the Transpec's default. If you are willing to test boolean values strictly, you can convert them to `be true`/`be false` with `--boolean-matcher true,false` option. Note that this may break your specs if your library codes don't return exact boolean values.
382
401
 
383
- * Disabled by: `--keep deprecated`
402
+ * Conversion can be disabled by: `--keep deprecated`
403
+ * Deprecation: Deprecated since RSpec 2.99, removed at RSpec 3.0
384
404
  * See also: [Consider renaming `be_true` and `be_false` to `be_truthy` and `be_falsey` · rspec/rspec-expectations](https://github.com/rspec/rspec-expectations/issues/283)
385
405
 
386
406
  ### `be_close` matcher
@@ -393,7 +413,8 @@ expect(1.0 / 3.0).to be_close(0.333, 0.001)
393
413
  expect(1.0 / 3.0).to be_within(0.001).of(0.333)
394
414
  ```
395
415
 
396
- * Disabled by: `--keep deprecated`
416
+ * Conversion can be disabled by: `--keep deprecated`
417
+ * Deprecation: Deprecated since RSpec 2.1, removed at RSpec 3.0
397
418
  * See also: [New be within matcher and RSpec.deprecate fix · rspec/rspec-expectations](https://github.com/rspec/rspec-expectations/pull/32)
398
419
 
399
420
  ### `have(n).items` matcher
@@ -406,6 +427,7 @@ expect(collection).to have_at_least(3).items
406
427
  expect(collection).to have_at_most(3).items
407
428
  collection.should have(3).items
408
429
 
430
+ # Assume `team` responds to #players.
409
431
  expect(team).to have(3).players
410
432
 
411
433
  # Assume #players is a private method.
@@ -426,7 +448,8 @@ expect(team.send(:players).size).to eq(3)
426
448
  There's the option to continue using `have(n).items` matcher with [rspec-collection_matchers](https://github.com/rspec/rspec-collection_matchers) that is an external gem extracted from `rspec-expectations`.
427
449
  If you choose so, disable this conversion with `--keep have_items`.
428
450
 
429
- * Disabled by: `--keep have_items`
451
+ * Conversion can be disabled by: `--keep have_items`
452
+ * Deprecation: Deprecated since RSpec 2.99, removed at RSpec 3.0
430
453
  * See also: [Expectations: have(x).items matchers will be moved into an external gem - The Plan for RSpec 3](http://myronmars.to/n/dev-blog/2013/07/the-plan-for-rspec-3#expectations__matchers_will_be_moved_into_an_external_gem)
431
454
 
432
455
  ### Expectations on block
@@ -441,7 +464,8 @@ proc { do_something }.should raise_error
441
464
  expect { do_something }.to raise_error
442
465
  ```
443
466
 
444
- * Disabled by: `--keep should`
467
+ * Conversion can be disabled by: `--keep should`
468
+ * Deprecation: Deprecated since RSpec 3.0
445
469
  * See also: [Unification of Block vs. Value Syntaxes - RSpec's New Expectation Syntax](http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax#unification_of_block_vs_value_syntaxes)
446
470
 
447
471
  ### Negative error expectations with specific error
@@ -458,7 +482,8 @@ expect { do_something }.not_to raise_error
458
482
  lambda { do_something }.should_not raise_error # with `--keep should`
459
483
  ```
460
484
 
461
- * Disabled by: `--keep deprecated`
485
+ * Conversion can be disabled by: `--keep deprecated`
486
+ * Deprecation: Deprecated since RSpec 2.14, removed at RSpec 3.0
462
487
  * See also: [Consider deprecating `expect { }.not_to raise_error(SpecificErrorClass)` · rspec/rspec-expectations](https://github.com/rspec/rspec-expectations/issues/231)
463
488
 
464
489
  ### Message expectations
@@ -473,7 +498,8 @@ expect(obj).to receive(:foo)
473
498
  expect_any_instance_of(SomeClass).to receive(:foo)
474
499
  ```
475
500
 
476
- * Disabled by: `--keep should_receive`
501
+ * Conversion can be disabled by: `--keep should_receive`
502
+ * Deprecation: Deprecated since RSpec 3.0
477
503
  * See also: [RSpec's new message expectation syntax - Tea is awesome.](http://teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/)
478
504
 
479
505
  ### Message expectations that are actually method stubs
@@ -494,7 +520,8 @@ allow_any_instance_of(SomeClass).to receive(:foo)
494
520
  SomeClass.any_instance.stub(:foo) # with `--keep stub`
495
521
  ```
496
522
 
497
- * Disabled by: `--keep deprecated`
523
+ * Conversion can be disabled by: `--keep deprecated`
524
+ * Deprecation: Deprecated since RSpec 2.14, removed at RSpec 3.0
498
525
  * See also: [Don't allow at_least(0) · rspec/rspec-mocks](https://github.com/rspec/rspec-mocks/issues/133)
499
526
 
500
527
  ### Method stubs
@@ -524,7 +551,17 @@ allow(obj).to receive_messages(:foo => 1, :bar => 2)
524
551
  allow_any_instance_of(SomeClass).to receive(:foo)
525
552
  ```
526
553
 
527
- * Disabled by: `--keep stub`
554
+ Note: `allow(obj).to receive_messages(:foo => 1, :bar => 2)` that is designed to be the replacement for `obj.stub(:foo => 1, :bar => 2)` is available from RSpec 3.0 (though [it's now being considered to be backported to RSpec 2.99](https://github.com/rspec/rspec-mocks/issues/454)). So, in [the upgrade path to RSpec 3](http://myronmars.to/n/dev-blog/2013/07/the-plan-for-rspec-3#the_upgrade_path), if you want to convert them with keeping the syntax correspondence, you need to follow these steps:
555
+
556
+ 1. Upgrade to RSpec 2.99
557
+ 2. Run `transpec --keep stub`
558
+ 3. Upgrade to RSpec 3.0
559
+ 4. Run `transpec`
560
+
561
+ Otherwise `obj.stub(:foo => 1, :bar => 2)` will be converted to two `allow(obj).to receive(...).and_return(...)` expressions on RSpec 2.99.
562
+
563
+ * Conversion can be disabled by: `--keep stub`
564
+ * Deprecation: Deprecated since RSpec 3.0
528
565
  * See also:
529
566
  * [RSpec's new message expectation syntax - Tea is awesome.](http://teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/)
530
567
  * [allow receive with multiple methods · rspec/rspec-mocks](https://github.com/rspec/rspec-mocks/issues/368)
@@ -541,7 +578,8 @@ obj.stub(:foo) # with `--keep stub`
541
578
  obj.unstub(:foo)
542
579
  ```
543
580
 
544
- * Disabled by: `--keep deprecated`
581
+ * Conversion can be disabled by: `--keep deprecated`
582
+ * Deprecation: Deprecated since RSpec 2.14, removed at RSpec 3.0
545
583
  * See also: [Consider deprecating and/or removing #stub! and #unstub! at some point · rspec/rspec-mocks](https://github.com/rspec/rspec-mocks/issues/122)
546
584
 
547
585
  ### Method stubs with deprecated specification of number of times
@@ -556,7 +594,8 @@ allow(obj).to receive(:foo)
556
594
  obj.stub(:foo) # with `--keep stub`
557
595
  ```
558
596
 
559
- * Disabled by: `--keep deprecated`
597
+ * Conversion can be disabled by: `--keep deprecated`
598
+ * Deprecation: Deprecated since RSpec 2.14, removed at RSpec 3.0
560
599
  * See also: [Don't allow at_least(0) · rspec/rspec-mocks](https://github.com/rspec/rspec-mocks/issues/133)
561
600
 
562
601
  ### Deprecated test double aliases
@@ -570,8 +609,9 @@ mock('something')
570
609
  double('something')
571
610
  ```
572
611
 
573
- * Disabled by: `--keep deprecated`
574
- * See also: [Deprecate "stub" for doubles · rspec/rspec-mocks](https://github.com/rspec/rspec-mocks/issues/214)
612
+ * Conversion can be disabled by: `--keep deprecated`
613
+ * Deprecation: Deprecated since RSpec 2.14, removed at RSpec 3.0
614
+ * See also: [myronmarston / why_double.md - Gist](https://gist.github.com/myronmarston/6576665)
575
615
 
576
616
  ### Expectations on attribute of subject with `its`
577
617
 
@@ -595,7 +635,8 @@ END
595
635
  There's the option to continue using `its` with [rspec-its](https://github.com/rspec/rspec-its) that is an external gem extracted from `rspec-core`.
596
636
  If you choose so, disable this conversion with `--keep its`.
597
637
 
598
- * Disabled by: `--keep its`
638
+ * Conversion can be disabled by: `--keep its`
639
+ * Deprecation: Deprecated since RSpec 2.99, removed at RSpec 3.0
599
640
  * See also: [Core: its will be moved into an external gem - The Plan for RSpec 3](http://myronmars.to/n/dev-blog/2013/07/the-plan-for-rspec-3#core__will_be_moved_into_an_external_gem)
600
641
 
601
642
  ## Compatibility
@@ -63,7 +63,8 @@ module Transpec
63
63
  end
64
64
 
65
65
  if should.have_matcher && @configuration.convert_have_items?
66
- should.have_matcher.convert_to_standard_expectation!
66
+ parenthesize_matcher_arg = @configuration.parenthesize_matcher_arg
67
+ should.have_matcher.convert_to_standard_expectation!(parenthesize_matcher_arg)
67
68
  end
68
69
  end
69
70
 
@@ -149,7 +149,7 @@ module Transpec
149
149
  ],
150
150
  '-n' => [
151
151
  "Specify negative form of #{'to'.underline} that is used in",
152
- "#{'expect(...).to'.underline} syntax.",
152
+ "the #{'expect(...).to'.underline} syntax.",
153
153
  "Either #{'not_to'.bright} or #{'to_not'.bright}.",
154
154
  "Default: #{'not_to'.bright}"
155
155
  ],
@@ -164,7 +164,7 @@ module Transpec
164
164
  '-p' => [
165
165
  'Suppress parenthesizing argument of matcher',
166
166
  'when converting operator to non-operator in',
167
- "#{'expect'.underline} syntax. Note that it will be",
167
+ "the #{'expect'.underline} syntax. Note that it will be",
168
168
  'parenthesized even if this option is',
169
169
  'specified when parentheses are necessary to',
170
170
  'keep the meaning of the expression.',
@@ -11,14 +11,14 @@ module Transpec
11
11
 
12
12
  def ==(other)
13
13
  self.class == other.class &&
14
- @original_syntax == other.original_syntax &&
15
- @converted_syntax == other.converted_syntax
14
+ original_syntax == other.original_syntax &&
15
+ converted_syntax == other.converted_syntax
16
16
  end
17
17
 
18
18
  alias_method :eql?, :==
19
19
 
20
20
  def hash
21
- @original_syntax.hash ^ @converted_syntax.hash
21
+ original_syntax.hash ^ converted_syntax.hash
22
22
  end
23
23
 
24
24
  def to_s
@@ -17,6 +17,8 @@ module Transpec
17
17
  # for String (String responds to #size).
18
18
  QUERY_METHOD_PRIORITIES = [:size, :count, :length].freeze
19
19
 
20
+ attr_reader :expectation
21
+
20
22
  def self.standalone?
21
23
  false
22
24
  end
@@ -60,9 +62,9 @@ module Transpec
60
62
  rewriter.register_request(node, key, code)
61
63
  end
62
64
 
63
- def convert_to_standard_expectation!
65
+ def convert_to_standard_expectation!(parenthesize_matcher_arg = true)
64
66
  replace(@expectation.subject_range, replacement_subject_source)
65
- replace(expression_range, replacement_matcher_source(size_source))
67
+ replace(expression_range, replacement_matcher_source(size_source, parenthesize_matcher_arg))
66
68
  register_record
67
69
  end
68
70
 
@@ -103,12 +105,21 @@ module Transpec
103
105
  end
104
106
  end
105
107
 
106
- private
107
-
108
108
  def default_query_method
109
109
  QUERY_METHOD_PRIORITIES.first
110
110
  end
111
111
 
112
+ def replacement_matcher_source(size_source, parenthesize_arg = true)
113
+ case @expectation.current_syntax_type
114
+ when :should
115
+ replacement_matcher_source_for_should(size_source)
116
+ when :expect
117
+ replacement_matcher_source_for_expect(size_source, parenthesize_arg)
118
+ end
119
+ end
120
+
121
+ private
122
+
112
123
  def replacement_subject_source
113
124
  source = @expectation.subject_range.source
114
125
  if subject_is_owner_of_collection?
@@ -121,20 +132,26 @@ module Transpec
121
132
  source << ".#{query_method}"
122
133
  end
123
134
 
124
- def replacement_matcher_source(size_source)
125
- case @expectation.current_syntax_type
126
- when :should
127
- case have_method_name
128
- when :have, :have_exactly then "== #{size_source}"
129
- when :have_at_least then ">= #{size_source}"
130
- when :have_at_most then "<= #{size_source}"
131
- end
132
- when :expect
133
- case have_method_name
134
- when :have, :have_exactly then "eq(#{size_source})"
135
- when :have_at_least then "be >= #{size_source}"
136
- when :have_at_most then "be <= #{size_source}"
135
+ def replacement_matcher_source_for_should(size_source)
136
+ case have_method_name
137
+ when :have, :have_exactly then "== #{size_source}"
138
+ when :have_at_least then ">= #{size_source}"
139
+ when :have_at_most then "<= #{size_source}"
140
+ end
141
+ end
142
+
143
+ def replacement_matcher_source_for_expect(size_source, parenthesize_arg)
144
+ case have_method_name
145
+ when :have, :have_exactly
146
+ if parenthesize_arg
147
+ "eq(#{size_source})"
148
+ else
149
+ "eq #{size_source}"
137
150
  end
151
+ when :have_at_least
152
+ "be >= #{size_source}"
153
+ when :have_at_most
154
+ "be <= #{size_source}"
138
155
  end
139
156
  end
140
157
 
@@ -148,47 +165,67 @@ module Transpec
148
165
  end
149
166
 
150
167
  def register_record
151
- @report.records << Record.new(original_syntax, converted_syntax)
168
+ @report.records << HaveRecord.new(self)
152
169
  end
153
170
 
154
- def original_syntax
155
- if subject_is_owner_of_collection?
156
- subject = 'obj'
157
- items = items_name
158
- else
159
- subject = 'collection'
160
- items = 'items'
171
+ class HaveRecord < Record
172
+ def initialize(have)
173
+ @have = have
174
+ end
175
+
176
+ def original_syntax
177
+ @original_syntax ||= begin
178
+ syntax = case @have.expectation
179
+ when Should
180
+ "#{original_subject}.should"
181
+ when Expect
182
+ "expect(#{original_subject}).to"
183
+ end
184
+
185
+ syntax << " #{@have.have_method_name}(n).#{original_items}"
186
+ end
187
+ end
188
+
189
+ def converted_syntax
190
+ @converted_syntax ||= begin
191
+ syntax = case @have.expectation.current_syntax_type
192
+ when :should
193
+ "#{converted_subject}.should"
194
+ when :expect
195
+ "expect(#{converted_subject}).to"
196
+ end
197
+
198
+ syntax << " #{@have.replacement_matcher_source('n')}"
199
+ end
200
+ end
201
+
202
+ def original_subject
203
+ if @have.subject_is_owner_of_collection?
204
+ 'obj'
205
+ else
206
+ 'collection'
207
+ end
208
+ end
209
+
210
+ def original_items
211
+ if @have.subject_is_owner_of_collection?
212
+ @have.items_name
213
+ else
214
+ 'items'
215
+ end
161
216
  end
162
217
 
163
- syntax = case @expectation
164
- when Should
165
- "#{subject}.should"
166
- when Expect
167
- "expect(#{subject}).to"
168
- end
169
-
170
- syntax << " #{have_method_name}(n).#{items}"
171
- end
172
-
173
- def converted_syntax
174
- subject = if subject_is_owner_of_collection?
175
- if collection_accessor_is_private?
176
- "obj.send(#{items_name.inspect}).#{query_method}"
177
- else
178
- "obj.#{items_name}.#{query_method}"
179
- end
180
- else
181
- "collection.#{default_query_method}"
182
- end
183
-
184
- syntax = case @expectation.current_syntax_type
185
- when :should
186
- "#{subject}.should"
187
- when :expect
188
- "expect(#{subject}).to"
189
- end
190
-
191
- syntax << " #{replacement_matcher_source('n')}"
218
+ def converted_subject
219
+ if @have.subject_is_owner_of_collection?
220
+ if @have.collection_accessor_is_private?
221
+ "obj.send(#{@have.items_name.inspect}).#{@have.query_method}"
222
+ else
223
+ "obj.#{@have.items_name}.#{@have.query_method}"
224
+ end
225
+ else
226
+ "collection.#{@have.default_query_method}"
227
+ end
228
+ end
192
229
  end
193
230
  end
194
231
  end
@@ -5,7 +5,7 @@ module Transpec
5
5
  module Version
6
6
  MAJOR = 1
7
7
  MINOR = 2
8
- PATCH = 0
8
+ PATCH = 1
9
9
 
10
10
  def self.to_s
11
11
  [MAJOR, MINOR, PATCH].join('.')
@@ -77,7 +77,7 @@ module Transpec
77
77
  end
78
78
 
79
79
  it 'returns itself' do
80
- returned_value = target_node.each_ancestor_node { }
80
+ returned_value = target_node.each_ancestor_node {}
81
81
  returned_value.should be(target_node)
82
82
  end
83
83
  end
@@ -133,7 +133,7 @@ module Transpec
133
133
  end
134
134
 
135
135
  it 'returns itself' do
136
- returned_value = ast.each_child_node { }
136
+ returned_value = ast.each_child_node {}
137
137
  returned_value.should be(ast)
138
138
  end
139
139
  end
@@ -191,7 +191,7 @@ module Transpec
191
191
  end
192
192
 
193
193
  it 'returns itself' do
194
- returned_value = ast.each_descendent_node { }
194
+ returned_value = ast.each_descendent_node {}
195
195
  returned_value.should be(ast)
196
196
  end
197
197
  end
@@ -245,7 +245,7 @@ module Transpec
245
245
  end
246
246
 
247
247
  it 'returns itself' do
248
- returned_value = ast.each_node { }
248
+ returned_value = ast.each_node {}
249
249
  returned_value.should be(ast)
250
250
  end
251
251
  end
@@ -171,9 +171,22 @@ module Transpec
171
171
  context 'when Configuration#convert_have_items? is true' do
172
172
  before { configuration.convert_have_items = true }
173
173
 
174
- it 'invokes Have#convert_to_standard_expectation!' do
175
- should_object.have_matcher.should_receive(:convert_to_standard_expectation!)
176
- converter.process_should(should_object)
174
+ context 'and Configuration#parenthesize_matcher_arg is true' do
175
+ before { configuration.parenthesize_matcher_arg = true }
176
+
177
+ it 'invokes Have#convert_to_standard_expectation! with true' do
178
+ should_object.have_matcher.should_receive(:convert_to_standard_expectation!).with(true)
179
+ converter.process_should(should_object)
180
+ end
181
+ end
182
+
183
+ context 'and Configuration#parenthesize_matcher_arg is false' do
184
+ before { configuration.parenthesize_matcher_arg = false }
185
+
186
+ it 'invokes Have#convert_to_standard_expectation! with false' do
187
+ should_object.have_matcher.should_receive(:convert_to_standard_expectation!).with(false)
188
+ converter.process_should(should_object)
189
+ end
177
190
  end
178
191
 
179
192
  context 'and Configuration#convert_should? is true' do
@@ -105,6 +105,8 @@ module Transpec
105
105
  end
106
106
 
107
107
  context 'and Should#expectize! is invoked before it' do
108
+ let(:parenthesize_matcher_arg) { true }
109
+
108
110
  let(:expected_source) do
109
111
  <<-END
110
112
  describe 'example' do
@@ -117,7 +119,7 @@ module Transpec
117
119
 
118
120
  before do
119
121
  should_object.expectize!
120
- should_object.have_matcher.convert_to_standard_expectation!
122
+ should_object.have_matcher.convert_to_standard_expectation!(parenthesize_matcher_arg)
121
123
  end
122
124
 
123
125
  it 'converts into `expect(collection.size).to eq(2)` form' do
@@ -128,6 +130,29 @@ module Transpec
128
130
  record.original_syntax.should == 'collection.should have(n).items'
129
131
  record.converted_syntax.should == 'expect(collection.size).to eq(n)'
130
132
  end
133
+
134
+ context 'and false is passed as `parenthesize_matcher_arg` argument' do
135
+ let(:parenthesize_matcher_arg) { false }
136
+
137
+ let(:expected_source) do
138
+ <<-END
139
+ describe 'example' do
140
+ it 'has 2 items' do
141
+ expect(collection.size).to eq 2
142
+ end
143
+ end
144
+ END
145
+ end
146
+
147
+ it 'converts into `expect(collection.size).to eq 2` form' do
148
+ rewritten_source.should == expected_source
149
+ end
150
+
151
+ it 'adds record "`collection.should have(n).items` -> `expect(collection.size).to eq(n)`"' do
152
+ record.original_syntax.should == 'collection.should have(n).items'
153
+ record.converted_syntax.should == 'expect(collection.size).to eq(n)'
154
+ end
155
+ end
131
156
  end
132
157
  end
133
158
 
data/tasks/demo.rake CHANGED
@@ -5,9 +5,9 @@ require_relative 'lib/transpec_demo'
5
5
  namespace :demo do
6
6
  # rubocop:disable LineLength
7
7
  demos = [
8
- TranspecDemo.new('git@github.com:yujinakayama/twitter.git', 'v4.1.0'),
9
- TranspecDemo.new('git@github.com:yujinakayama/guard.git', 'transpec-test', %w(--without development)),
10
- TranspecDemo.new('git@github.com:yujinakayama/mail.git', 'transpec-test')
8
+ TranspecDemo.new('git@github.com:yujinakayama/twitter.git', 'transpec-test-rspec-2-99'),
9
+ TranspecDemo.new('git@github.com:yujinakayama/guard.git', 'transpec-test-rspec-2-99', %w(--without development)),
10
+ TranspecDemo.new('git@github.com:yujinakayama/mail.git', 'transpec-test-rspec-2-99')
11
11
  ]
12
12
  # rubocop:enable LineLength
13
13
 
metadata CHANGED
@@ -1,167 +1,167 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: transpec
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yuji Nakayama
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-11-05 00:00:00.000000000 Z
11
+ date: 2013-11-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: parser
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ~>
18
18
  - !ruby/object:Gem::Version
19
19
  version: '2.0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ~>
25
25
  - !ruby/object:Gem::Version
26
26
  version: '2.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rspec
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ~>
32
32
  - !ruby/object:Gem::Version
33
33
  version: '2.14'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ~>
39
39
  - !ruby/object:Gem::Version
40
40
  version: '2.14'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bundler
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ~>
46
46
  - !ruby/object:Gem::Version
47
47
  version: '1.3'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - ~>
53
53
  - !ruby/object:Gem::Version
54
54
  version: '1.3'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rainbow
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - "~>"
59
+ - - ~>
60
60
  - !ruby/object:Gem::Version
61
61
  version: '1.1'
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - "~>"
66
+ - - ~>
67
67
  - !ruby/object:Gem::Version
68
68
  version: '1.1'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rake
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - "~>"
73
+ - - ~>
74
74
  - !ruby/object:Gem::Version
75
75
  version: '10.1'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - "~>"
80
+ - - ~>
81
81
  - !ruby/object:Gem::Version
82
82
  version: '10.1'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: simplecov
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - "~>"
87
+ - - ~>
88
88
  - !ruby/object:Gem::Version
89
89
  version: '0.7'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - "~>"
94
+ - - ~>
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0.7'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: rubocop
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - "~>"
101
+ - - ~>
102
102
  - !ruby/object:Gem::Version
103
103
  version: '0.10'
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - "~>"
108
+ - - ~>
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0.10'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: guard-rspec
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - "~>"
115
+ - - ~>
116
116
  - !ruby/object:Gem::Version
117
117
  version: '4.0'
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
- - - "~>"
122
+ - - ~>
123
123
  - !ruby/object:Gem::Version
124
124
  version: '4.0'
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: guard-rubocop
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
- - - "~>"
129
+ - - ~>
130
130
  - !ruby/object:Gem::Version
131
131
  version: '1.0'
132
132
  type: :development
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
- - - "~>"
136
+ - - ~>
137
137
  - !ruby/object:Gem::Version
138
138
  version: '1.0'
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: guard-shell
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
- - - "~>"
143
+ - - ~>
144
144
  - !ruby/object:Gem::Version
145
145
  version: '0.5'
146
146
  type: :development
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
- - - "~>"
150
+ - - ~>
151
151
  - !ruby/object:Gem::Version
152
152
  version: '0.5'
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: ruby_gntp
155
155
  requirement: !ruby/object:Gem::Requirement
156
156
  requirements:
157
- - - "~>"
157
+ - - ~>
158
158
  - !ruby/object:Gem::Version
159
159
  version: '0.3'
160
160
  type: :development
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
- - - "~>"
164
+ - - ~>
165
165
  - !ruby/object:Gem::Version
166
166
  version: '0.3'
167
167
  description: Transpec converts your specs into latest RSpec syntax with static and
@@ -173,9 +173,9 @@ executables:
173
173
  extensions: []
174
174
  extra_rdoc_files: []
175
175
  files:
176
- - ".gitignore"
177
- - ".rubocop.yml"
178
- - ".travis.yml"
176
+ - .gitignore
177
+ - .rubocop.yml
178
+ - .travis.yml
179
179
  - CHANGELOG.md
180
180
  - Gemfile
181
181
  - Guardfile
@@ -275,12 +275,12 @@ require_paths:
275
275
  - lib
276
276
  required_ruby_version: !ruby/object:Gem::Requirement
277
277
  requirements:
278
- - - ">="
278
+ - - '>='
279
279
  - !ruby/object:Gem::Version
280
280
  version: '0'
281
281
  required_rubygems_version: !ruby/object:Gem::Requirement
282
282
  requirements:
283
- - - ">="
283
+ - - '>='
284
284
  - !ruby/object:Gem::Version
285
285
  version: '0'
286
286
  requirements: []