rspec_be_an_array_of 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 0d31f978cb4d25be169fc3b00d0ba5e657a495af
4
+ data.tar.gz: a03e656370229e54e0b9f8f65271c7239d8d630f
5
+ SHA512:
6
+ metadata.gz: fa892c9b0e6c4a48c9ef9c15280815a28eb386072decc236573fba087927180997b1ddd9337aa06cc7f5e044e39eff7d13ecc53535b6cfc4fecbb86537a3c78b
7
+ data.tar.gz: ffbbb0fcf714672305cdc2c19e51604a8bee51c82ae4a8bea18f05f309581b07dd4c8cd2bed8ee96a5f3bd622fa8ad0f2df8c3f6f61f8324a59a5c2a3ca2ad2c
data/LICENSE.md ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2016 []().
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,82 @@
1
+ # RspecBeAnArrayOf
2
+
3
+ [![Gem Version](https://badge.fury.io/rb/rspec_be_an_array_of.svg)](http://badge.fury.io/rb/rspec_be_an_array_of)
4
+ [![Code Climate GPA](https://codeclimate.com/github/pekhee/rspec_be_an_array_of.svg)](https://codeclimate.com/github/pekhee/rspec_be_an_array_of)
5
+ [![Gemnasium Status](https://gemnasium.com/pekhee/rspec_be_an_array_of.svg)](https://gemnasium.com/pekhee/rspec_be_an_array_of)
6
+ [![Travis CI Status](https://secure.travis-ci.org/pekhee/rspec_be_an_array_of.svg)](https://travis-ci.org/pekhee/rspec_be_an_array_of)
7
+
8
+ <!-- Tocer[start]: Auto-generated, don't remove. -->
9
+
10
+ # Table of Contents
11
+
12
+ - [Features](#features)
13
+ - [Requirements](#requirements)
14
+ - [Setup](#setup)
15
+ - [Usage](#usage)
16
+ - [Tests](#tests)
17
+ - [Versioning](#versioning)
18
+ - [Code of Conduct](#code-of-conduct)
19
+ - [Contributions](#contributions)
20
+ - [License](#license)
21
+ - [History](#history)
22
+ - [Credits](#credits)
23
+
24
+ <!-- Tocer[finish]: Auto-generated, don't remove. -->
25
+
26
+ # Features
27
+
28
+ # Requirements
29
+
30
+ 0. [MRI 2.x](https://www.ruby-lang.org)
31
+ 1. [RSpec 3.x](http://rspec.info/)
32
+
33
+ # Setup
34
+
35
+ To install, type the following:
36
+
37
+ gem install rspec_be_an_array_of
38
+
39
+ Add the following to your Gemfile:
40
+
41
+ gem "rspec_be_an_array_of"
42
+
43
+ # Usage
44
+
45
+ RSpec.describe ["an", "array", "of", "strings"] do
46
+ it { is_expected.to be_an_array_of String}
47
+ end
48
+
49
+ # Tests
50
+
51
+ rake spec
52
+
53
+ # Versioning
54
+
55
+ Read [Semantic Versioning](http://semver.org) for details. Briefly, it means:
56
+
57
+ - Patch (x.y.Z) - Incremented for small, backwards compatible bug fixes.
58
+ - Minor (x.Y.z) - Incremented for new, backwards compatible public API enhancements and/or bug fixes.
59
+ - Major (X.y.z) - Incremented for any backwards incompatible public API changes.
60
+
61
+ # Code of Conduct
62
+
63
+ Please note that this project is released with a [CODE OF CONDUCT](CODE_OF_CONDUCT.md). By participating in this project
64
+ you agree to abide by its terms.
65
+
66
+ # Contributions
67
+
68
+ Read [CONTRIBUTING](CONTRIBUTING.md) for details.
69
+
70
+ # License
71
+
72
+ Copyright (c) 2016 [Pooyan Khosravi]().
73
+ Read the [LICENSE](LICENSE.md) for details.
74
+
75
+ # History
76
+
77
+ Read the [CHANGELOG](CHANGELOG.md) for details.
78
+ Built with [Gemsmith](https://github.com/bkuhlmann/gemsmith).
79
+
80
+ # Credits
81
+
82
+ Developed by [Pooyan Khosravi]().
@@ -0,0 +1,5 @@
1
+ require "rspec_be_an_array_of/identity"
2
+ require "rspec_be_an_array_of/matcher"
3
+
4
+ module RSpecBeAnArrayOf
5
+ end
@@ -0,0 +1,20 @@
1
+ module RSpecBeAnArrayOf
2
+ # Gem identity information.
3
+ module Identity
4
+ def self.name
5
+ "rspec_be_an_array_of"
6
+ end
7
+
8
+ def self.label
9
+ "RSpecBeAnArrayOf"
10
+ end
11
+
12
+ def self.version
13
+ "0.1.0"
14
+ end
15
+
16
+ def self.version_label
17
+ "#{label} #{version}"
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,17 @@
1
+ RSpec::Matchers.define :be_an_array_of do |type|
2
+ attr_accessor :actual
3
+
4
+ match do |actual|
5
+ return false unless actual.is_a? Array
6
+ self.actual = actual
7
+
8
+ actual.map { |e| e.is_a? type}.reduce(&:&)
9
+ end
10
+
11
+ failure_message do
12
+ <<-MSG.gsub(/^\s+/, " ")
13
+ expected object to be an array#{" of " + type.name unless type.nil?} but it was
14
+ #{actual}
15
+ MSG
16
+ end
17
+ end
@@ -0,0 +1,6 @@
1
+ begin
2
+ require "rspec/core/rake_task"
3
+ RSpec::Core::RakeTask.new(:spec)
4
+ rescue LoadError => error
5
+ puts error.message
6
+ end
@@ -0,0 +1,6 @@
1
+ begin
2
+ require "rubocop/rake_task"
3
+ RuboCop::RakeTask.new
4
+ rescue LoadError => error
5
+ puts error.message
6
+ end
metadata ADDED
@@ -0,0 +1,264 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rspec_be_an_array_of
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Pooyan Khosravi
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2016-01-06 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rspec
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: gemsmith
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: pry
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: pry-byebug
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: pry-remote
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: pry-state
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: pry-rescue
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: pry-stack_explorer
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
139
+ - !ruby/object:Gem::Dependency
140
+ name: rb-fsevent
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - ">="
144
+ - !ruby/object:Gem::Version
145
+ version: '0'
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - ">="
151
+ - !ruby/object:Gem::Version
152
+ version: '0'
153
+ - !ruby/object:Gem::Dependency
154
+ name: guard-rspec
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - ">="
158
+ - !ruby/object:Gem::Version
159
+ version: '0'
160
+ type: :development
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - ">="
165
+ - !ruby/object:Gem::Version
166
+ version: '0'
167
+ - !ruby/object:Gem::Dependency
168
+ name: terminal-notifier
169
+ requirement: !ruby/object:Gem::Requirement
170
+ requirements:
171
+ - - ">="
172
+ - !ruby/object:Gem::Version
173
+ version: '0'
174
+ type: :development
175
+ prerelease: false
176
+ version_requirements: !ruby/object:Gem::Requirement
177
+ requirements:
178
+ - - ">="
179
+ - !ruby/object:Gem::Version
180
+ version: '0'
181
+ - !ruby/object:Gem::Dependency
182
+ name: terminal-notifier-guard
183
+ requirement: !ruby/object:Gem::Requirement
184
+ requirements:
185
+ - - ">="
186
+ - !ruby/object:Gem::Version
187
+ version: '0'
188
+ type: :development
189
+ prerelease: false
190
+ version_requirements: !ruby/object:Gem::Requirement
191
+ requirements:
192
+ - - ">="
193
+ - !ruby/object:Gem::Version
194
+ version: '0'
195
+ - !ruby/object:Gem::Dependency
196
+ name: rubocop
197
+ requirement: !ruby/object:Gem::Requirement
198
+ requirements:
199
+ - - ">="
200
+ - !ruby/object:Gem::Version
201
+ version: '0'
202
+ type: :development
203
+ prerelease: false
204
+ version_requirements: !ruby/object:Gem::Requirement
205
+ requirements:
206
+ - - ">="
207
+ - !ruby/object:Gem::Version
208
+ version: '0'
209
+ - !ruby/object:Gem::Dependency
210
+ name: codeclimate-test-reporter
211
+ requirement: !ruby/object:Gem::Requirement
212
+ requirements:
213
+ - - ">="
214
+ - !ruby/object:Gem::Version
215
+ version: '0'
216
+ type: :development
217
+ prerelease: false
218
+ version_requirements: !ruby/object:Gem::Requirement
219
+ requirements:
220
+ - - ">="
221
+ - !ruby/object:Gem::Version
222
+ version: '0'
223
+ description: An RSpec matcher that ensures expected is an array and each element is
224
+ of specified type.
225
+ email:
226
+ - pekhee@gmail.com
227
+ executables: []
228
+ extensions: []
229
+ extra_rdoc_files:
230
+ - README.md
231
+ - LICENSE.md
232
+ files:
233
+ - LICENSE.md
234
+ - README.md
235
+ - lib/rspec_be_an_array_of.rb
236
+ - lib/rspec_be_an_array_of/identity.rb
237
+ - lib/rspec_be_an_array_of/matcher.rb
238
+ - lib/tasks/rspec.rake
239
+ - lib/tasks/rubocop.rake
240
+ homepage: https://github.com//rspec_be_an_array_of
241
+ licenses:
242
+ - MIT
243
+ metadata: {}
244
+ post_install_message:
245
+ rdoc_options: []
246
+ require_paths:
247
+ - lib
248
+ required_ruby_version: !ruby/object:Gem::Requirement
249
+ requirements:
250
+ - - ">="
251
+ - !ruby/object:Gem::Version
252
+ version: '0'
253
+ required_rubygems_version: !ruby/object:Gem::Requirement
254
+ requirements:
255
+ - - ">="
256
+ - !ruby/object:Gem::Version
257
+ version: '0'
258
+ requirements: []
259
+ rubyforge_project:
260
+ rubygems_version: 2.4.5.1
261
+ signing_key:
262
+ specification_version: 4
263
+ summary: rspec matcher be_an_array_of type
264
+ test_files: []