rspec-power_assert 0.4.0 → 1.0.0

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: b8283c8699d52f22d6ec4d8ee4189ef9b7645d25
4
- data.tar.gz: 7e57857c854a0ae0ec7175a40bc443c87b9e5877
3
+ metadata.gz: d49a8fb894a9110c5488df87d91c774b624cbeda
4
+ data.tar.gz: d6f1ab6d4de4c534a39b002885a02b3ccbe3ec8b
5
5
  SHA512:
6
- metadata.gz: c9ce5c8cd7a38b8fca225bb809baebb9e521fa6878337b44a28b39accba69abe11a503821f021803efddccfe633e702c1ecef8f996c0f49624c59d51aca83c62
7
- data.tar.gz: b566e289701333a9cffd1f7b08de4cff63568ba10a5a52f31fbead90e74241490d099770a5f4ff281ed3e46a1a3ad8874cc46bb4bf14f7a2c0935f9c67371205
6
+ metadata.gz: bf3cb09c9b955cceba47da0c22b3f103b1756aa5414ee042ae17d03282e3a71571299347715456b930626c4456231eea35c9a332bc962094fb3fd7dda0206d47
7
+ data.tar.gz: f9f8d54f4d23f3f654b8f75d68012d511a8f83a2d14d5a9fbaafbff83a4c515635fb07bbb1b8505d531ca9b496ac04954bf68945e4462a01b044d63705a17b14
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Rspec::PowerAssert
1
+ # RSpec::PowerAssert
2
2
  [![Gem Version](https://badge.fury.io/rb/rspec-power_assert.svg)](http://badge.fury.io/rb/rspec-power_assert)
3
3
 
4
4
  ## Support
@@ -70,7 +70,7 @@ RSpec::PowerAssert.example_group_assertion_alias :assert
70
70
  ## Sample
71
71
  ### spec sample
72
72
  ```ruby
73
- describe Rspec::PowerAssert do
73
+ describe RSpec::PowerAssert do
74
74
  describe Array do
75
75
  describe "#map" do
76
76
  let(:array) { [1, 2, 3] }
@@ -133,7 +133,7 @@ end
133
133
 
134
134
  ### output sample
135
135
  ```
136
- Rspec::PowerAssert
136
+ RSpec::PowerAssert
137
137
  Array
138
138
  #map
139
139
  example at ./spec/rspec/power_assert_spec.rb:13 (FAILED - 1)
@@ -170,7 +170,7 @@ Rspec::PowerAssert
170
170
 
171
171
  Failures:
172
172
 
173
- 1) Rspec::PowerAssert Array#map
173
+ 1) RSpec::PowerAssert Array#map
174
174
  Failure/Error: is_asserted_by { subject.map(&:upcase) == array }
175
175
  is_asserted_by { subject.map(&:upcase) == array }
176
176
  | | | |
@@ -182,7 +182,7 @@ Failures:
182
182
  # ./lib/rspec/power_assert.rb:31:in `is_asserted_by'
183
183
  # ./spec/rspec/power_assert_spec.rb:14:in `block (4 levels) in <top (required)>'
184
184
 
185
- 2) Rspec::PowerAssert Array#map
185
+ 2) RSpec::PowerAssert Array#map
186
186
  Failure/Error: is_asserted_by {
187
187
  subject.map(&:upcase) == array
188
188
  | | | |
@@ -194,7 +194,7 @@ Failures:
194
194
  # ./lib/rspec/power_assert.rb:31:in `is_asserted_by'
195
195
  # ./spec/rspec/power_assert_spec.rb:18:in `block (4 levels) in <top (required)>'
196
196
 
197
- 3) Rspec::PowerAssert Array#map
197
+ 3) RSpec::PowerAssert Array#map
198
198
  Failure/Error: is_asserted_by { upcased == @array }
199
199
  is_asserted_by { upcased == @array }
200
200
  | | |
@@ -205,7 +205,7 @@ Failures:
205
205
  # ./lib/rspec/power_assert.rb:31:in `is_asserted_by'
206
206
  # ./spec/rspec/power_assert_spec.rb:36:in `block (4 levels) in <top (required)>'
207
207
 
208
- 4) Rspec::PowerAssert Array#map should transform array (failed)
208
+ 4) RSpec::PowerAssert Array#map should transform array (failed)
209
209
  Failure/Error: is_asserted_by { subject.map(&:upcase) == %w(A B) }
210
210
  is_asserted_by { subject.map(&:upcase) == %w(A B) }
211
211
  | | |
@@ -216,7 +216,7 @@ Failures:
216
216
  # ./lib/rspec/power_assert.rb:31:in `is_asserted_by'
217
217
  # ./spec/rspec/power_assert_spec.rb:45:in `block (4 levels) in <top (required)>'
218
218
 
219
- 5) Rspec::PowerAssert Array#map
219
+ 5) RSpec::PowerAssert Array#map
220
220
  Failure/Error: it_is_asserted_by { subject.map(&:upcase) == %w(A B) }
221
221
  it_is_asserted_by { subject.map(&:upcase) == %w(A B) }
222
222
  | | |
@@ -227,7 +227,7 @@ Failures:
227
227
  # ./lib/rspec/power_assert.rb:44:in `evaluate_example'
228
228
  # ./spec/rspec/power_assert_spec.rb:50:in `block in it_is_asserted_by'
229
229
 
230
- 6) Rspec::PowerAssert Array#map succ each element
230
+ 6) RSpec::PowerAssert Array#map succ each element
231
231
  Failure/Error: it_is_asserted_by "succ each element" do
232
232
  subject.map(&:succ) == ["b", "c", "e"] + @array
233
233
  | | | |
@@ -244,19 +244,19 @@ Finished in 0.01725 seconds (files took 0.12235 seconds to load)
244
244
 
245
245
  Failed examples:
246
246
 
247
- rspec ./spec/rspec/power_assert_spec.rb:13 # Rspec::PowerAssert Array#map
248
- rspec ./spec/rspec/power_assert_spec.rb:17 # Rspec::PowerAssert Array#map
249
- rspec ./spec/rspec/power_assert_spec.rb:33 # Rspec::PowerAssert Array#map
250
- rspec ./spec/rspec/power_assert_spec.rb:44 # Rspec::PowerAssert Array#map should transform array (failed)
251
- rspec ./spec/rspec/power_assert_spec.rb:50 # Rspec::PowerAssert Array#map
252
- rspec ./spec/rspec/power_assert_spec.rb:56 # Rspec::PowerAssert Array#map succ each element
247
+ rspec ./spec/rspec/power_assert_spec.rb:13 # RSpec::PowerAssert Array#map
248
+ rspec ./spec/rspec/power_assert_spec.rb:17 # RSpec::PowerAssert Array#map
249
+ rspec ./spec/rspec/power_assert_spec.rb:33 # RSpec::PowerAssert Array#map
250
+ rspec ./spec/rspec/power_assert_spec.rb:44 # RSpec::PowerAssert Array#map should transform array (failed)
251
+ rspec ./spec/rspec/power_assert_spec.rb:50 # RSpec::PowerAssert Array#map
252
+ rspec ./spec/rspec/power_assert_spec.rb:56 # RSpec::PowerAssert Array#map succ each element
253
253
  ```
254
254
 
255
255
  On RSpec-3.3 or later, support `aggregate_failures`
256
256
  (Thanks sue445)
257
257
 
258
258
  ```
259
- 2) Rspec::PowerAssert Array#map When use aggregate_failures should be called be is_asserted_by with 3 times
259
+ 2) RSpec::PowerAssert Array#map When use aggregate_failures should be called be is_asserted_by with 3 times
260
260
  Got 2 failures from failure aggregation block.
261
261
  # ./spec/rspec/power_assert_spec.rb:81:in `block (5 levels) in <top (required)>'
262
262
 
@@ -3,22 +3,7 @@ require "rspec/core"
3
3
  require "power_assert"
4
4
 
5
5
  module PowerAssert
6
- class << self
7
- def rspec_start(assertion_proc, assertion_method: nil, source_binding: TOPLEVEL_BINDING)
8
- yield RSpecContext.new(assertion_proc, assertion_method, source_binding)
9
- end
10
- end
11
-
12
- class RSpecContext < Context
13
- # hack for context changing
14
- def do_yield
15
- @trace.enable do
16
- @base_caller_length = caller_locations.length + 2
17
- yield
18
- end
19
- end
20
- end
21
- private_constant :RSpecContext
6
+ IGNORED_LIB_DIRS[RSpec::PowerAssert] = __dir__
22
7
  end
23
8
 
24
9
  module RSpec
@@ -56,7 +41,7 @@ module RSpec
56
41
  # hack for context changing
57
42
  pr = -> { self.instance_exec(&blk) }
58
43
 
59
- result, msg = ::PowerAssert.rspec_start(pr, assertion_method: method_name) do |tp|
44
+ result, msg = ::PowerAssert.start(pr, assertion_method: method_name) do |tp|
60
45
  [tp.yield, tp.message_proc.call]
61
46
  end
62
47
 
@@ -1,5 +1,5 @@
1
- module Rspec
1
+ module RSpec
2
2
  module PowerAssert
3
- VERSION = "0.4.0"
3
+ VERSION = "1.0.0"
4
4
  end
5
5
  end
@@ -5,7 +5,7 @@ require 'rspec/power_assert/version'
5
5
 
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = "rspec-power_assert"
8
- spec.version = Rspec::PowerAssert::VERSION
8
+ spec.version = RSpec::PowerAssert::VERSION
9
9
  spec.authors = ["joker1007"]
10
10
  spec.email = ["kakyoin.hierophant@gmail.com"]
11
11
  spec.summary = %q{Power Assert for RSpec.}
@@ -18,9 +18,9 @@ Gem::Specification.new do |spec|
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
19
  spec.require_paths = ["lib"]
20
20
 
21
- spec.add_runtime_dependency "power_assert", "~> 0.3.0"
21
+ spec.add_runtime_dependency "power_assert", "~> 1.0.0"
22
22
  spec.add_runtime_dependency "rspec", ">= 2.14"
23
23
 
24
24
  spec.add_development_dependency "bundler", "~> 1.7"
25
- spec.add_development_dependency "rake", "~> 10.0"
25
+ spec.add_development_dependency "rake"
26
26
  end
@@ -3,7 +3,7 @@ require 'spec_helper'
3
3
  RSpec::PowerAssert.example_assertion_alias :assert
4
4
  RSpec::PowerAssert.example_group_assertion_alias :assert
5
5
 
6
- describe Rspec::PowerAssert do
6
+ describe RSpec::PowerAssert do
7
7
  describe Array do
8
8
  describe "#map" do
9
9
  let(:array) { [1, 2, 3] }
@@ -17,6 +17,12 @@ describe Rspec::PowerAssert do
17
17
  is_asserted_by { subject.map(&:upcase) == array }
18
18
  end
19
19
 
20
+ it do
21
+ is_asserted_by do
22
+ subject.map(&:upcase) == array
23
+ end
24
+ end
25
+
20
26
  it do
21
27
  assert { subject.map(&:upcase) == array }
22
28
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec-power_assert
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - joker1007
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-08-08 00:00:00.000000000 Z
11
+ date: 2017-01-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: power_assert
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.3.0
19
+ version: 1.0.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
- version: 0.3.0
26
+ version: 1.0.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rspec
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -56,16 +56,16 @@ dependencies:
56
56
  name: rake
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - "~>"
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
- version: '10.0'
61
+ version: '0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - "~>"
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
- version: '10.0'
68
+ version: '0'
69
69
  description: Power Assert for RSpec..
70
70
  email:
71
71
  - kakyoin.hierophant@gmail.com
@@ -106,7 +106,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
106
106
  version: '0'
107
107
  requirements: []
108
108
  rubyforge_project:
109
- rubygems_version: 2.6.4
109
+ rubygems_version: 2.6.8
110
110
  signing_key:
111
111
  specification_version: 4
112
112
  summary: Power Assert for RSpec.