rspec_typeof 0.3.4 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7d5a2dbf30b642e2f65f60576f661e4b532edc73
4
- data.tar.gz: daddc3f673829d85679bb70006bd062a6f612b8f
3
+ metadata.gz: ef6624622531821b9be14f5bfb5e71c36e1b3d1f
4
+ data.tar.gz: e9f6eeb08cc629b200d51121ffa490bd292cc8ae
5
5
  SHA512:
6
- metadata.gz: a2e34867bce7658a5849d606bb442fcf5ac4843ca3822c281039d24c78fa9bc4fe4c5cfef4cce5cf680b39e4f8187a5b3fdfc7d64ea40a8828403aaa0195c856
7
- data.tar.gz: e8eac6688c91225275721705091721e983d39f52cfc9f22dfde85d1c5d6e4321c188c4f718839ed4c3f22814be84f926d5406b975b49058121011ad67cb10b50
6
+ metadata.gz: 0f48444dfac5bfd2dae8646e64945662a30f5a2fc4f34cc432076c4fb9ca8a8ca9f62ba0654f1c64e3bf595903c097568687055e265264e05268a7596f2b1128
7
+ data.tar.gz: 502ef713daa7b3a26c88297deb4f3c42d59c5241618ac0ff5cdda2f7fc04e4320d044275ff05d405f89732f52b33df364f041a4de80120dfd49ec35fba3cd8ba
data/README.md CHANGED
@@ -1,9 +1,9 @@
1
1
  # RspecTypeof
2
2
  [![Gem Version](https://badge.fury.io/rb/rspec_typeof.svg)](https://badge.fury.io/rb/rspec_typeof)
3
3
  [![CodeClimate](https://codeclimate.com/github/Somiel/rspec_typeof/badges/gpa.svg)](https://codeclimate.com/github/Somiel/rspec_typeof)
4
- [![Build Status](https://travis-ci.org/Somiel/rspec_typeof.svg?branch=master)](https://travis-ci.org/Somiel/rspec_typeof)
4
+ [![Build Status](https://travis-ci.org/somiel/rspec_typeof.svg?branch=master)](https://travis-ci.org/somiel/rspec_typeof)
5
5
 
6
- Welcome to rspec_typeof, with this gem you can use "typeof" expectation in your tests for comfortable data format matching of both single data examples and data collections
6
+ Welcome to rspec_typeof, with this gem you can use "typeof" or "type_of" expectation in your tests for comfortable data format matching of both single data examples and data collections
7
7
 
8
8
 
9
9
  ## Installation
@@ -22,9 +22,10 @@ And then execute:
22
22
 
23
23
 
24
24
  ```ruby
25
- expect(true).to typeof(:true)
26
25
 
27
- expect(true).to typeof(:string_or_nil_or_true)
26
+ expect(true).to typeof(:true) or expect(true).to type_of(:true)
27
+
28
+ expect(true).to typeof(:string_or_nil_or_true) or expect(true).to type_of(:string_or_nil_or_true)
28
29
 
29
30
  expect({string: 'string', fixnum: 2, hash: {}, array: [], custom_class: CustomClass.new}).to match(
30
31
  string: typeof(:string_or_nil),
@@ -34,3 +34,5 @@ RSpec::Matchers.define :typeof do |expected_types|
34
34
  "expected that #{actual} would be an instance of #{types.join(' or ')}"
35
35
  end
36
36
  end
37
+
38
+ RSpec::Matchers.alias_matcher :type_of, :typeof
@@ -1,3 +1,3 @@
1
1
  module RspecTypeof
2
- VERSION = '0.3.4'
2
+ VERSION = '0.4.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec_typeof
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.4
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vovchuk Max
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-11-18 00:00:00.000000000 Z
11
+ date: 2016-12-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec