transproc 0.4.2 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: transproc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Piotr Solnica
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-01-12 00:00:00.000000000 Z
11
+ date: 2017-01-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -85,7 +85,6 @@ files:
85
85
  - lib/transproc/proc.rb
86
86
  - lib/transproc/recursion.rb
87
87
  - lib/transproc/registry.rb
88
- - lib/transproc/rspec.rb
89
88
  - lib/transproc/store.rb
90
89
  - lib/transproc/support/deprecations.rb
91
90
  - lib/transproc/transformer.rb
@@ -1,71 +0,0 @@
1
- # encoding: utf-8
2
-
3
- # ==============================================================================
4
- # Examples for testing transproc functions
5
- # ==============================================================================
6
-
7
- shared_context :call_transproc do
8
- let!(:__fn__) { described_class[*arguments] }
9
- let!(:__initial__) do
10
- begin
11
- input.dup
12
- rescue
13
- input
14
- end
15
- end
16
-
17
- subject { __fn__[input] }
18
- end
19
-
20
- shared_examples :transforming_data do
21
- include_context :call_transproc
22
-
23
- it '[returns the expected output]' do
24
- expect(subject).to eql(output), <<-REPORT.gsub(%r{.+\|}, '')
25
- |
26
- |fn = #{described_class}#{Array[*arguments]}
27
- |
28
- |fn[#{input}]
29
- |
30
- | expected: #{output}
31
- | got: #{subject}
32
- REPORT
33
- end
34
- end
35
-
36
- shared_examples :transforming_immutable_data do
37
- include_context :call_transproc
38
-
39
- it_behaves_like :transforming_data
40
-
41
- it '[keeps input unchanged]' do
42
- expect { subject }
43
- .not_to change { input }, <<-REPORT.gsub(%r{.+\|}, '')
44
- |
45
- |fn = #{described_class}#{Array[*arguments]}
46
- |
47
- |expected: not to change #{__initial__}
48
- | got: changed it to #{input}
49
- REPORT
50
- end
51
- end
52
-
53
- shared_examples :mutating_input_data do
54
- include_context :call_transproc
55
-
56
- it_behaves_like :transforming_data
57
-
58
- it '[changes input]' do
59
- expect { subject }
60
- .to change { input }
61
- .to(output), <<-REPORT.gsub(%r{.+\|}, '')
62
- |
63
- |fn = #{described_class}#{Array[*arguments]}
64
- |
65
- |fn[#{input}]
66
- |
67
- |expected: to change input to #{output}
68
- | got: #{input}
69
- REPORT
70
- end
71
- end