git_statistics 0.6.0 → 0.7.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.
@@ -1,35 +0,0 @@
1
- require 'spec_helper'
2
- include GitStatistics
3
-
4
- describe RegexMatcher do
5
- let(:change_info) { RegexMatcher.new(/(match)/i, 1) }
6
- let(:text) { 'matching string' }
7
-
8
- describe "#scan" do
9
- subject { change_info.scan(text) }
10
- context "with matching string" do
11
- its(:size) { should == 1 }
12
- end
13
- context "without matching string" do
14
- let(:text) { 'does not matter' }
15
- its(:size) { should == 0 }
16
- end
17
- end
18
- describe "#if_matches" do
19
- it "should yield the result with matching string" do
20
- original = :original
21
- change_info.if_matches(text) do |changes|
22
- original = :new_value
23
- end
24
- original.should == :new_value
25
- end
26
- it "should not yield the result without a matching string" do
27
- text = 'does not yield'
28
- original = :original
29
- change_info.if_matches(text) do |changes|
30
- original = :new_value
31
- end
32
- original.should == :original
33
- end
34
- end
35
- end