one_inch_punch 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +6 -0
- data/lib/punch.rb +2 -2
- data/lib/punch/version.rb +1 -1
- data/spec/punch_spec.rb +18 -3
- metadata +2 -2
data/History.txt
CHANGED
data/lib/punch.rb
CHANGED
data/lib/punch/version.rb
CHANGED
data/spec/punch_spec.rb
CHANGED
@@ -55,6 +55,21 @@ describe Punch do
|
|
55
55
|
it 'should return true' do
|
56
56
|
Punch.load.should == true
|
57
57
|
end
|
58
|
+
|
59
|
+
describe 'and is empty' do
|
60
|
+
before :each do
|
61
|
+
File.stubs(:read).returns('')
|
62
|
+
end
|
63
|
+
|
64
|
+
it 'should load the data as yaml' do
|
65
|
+
Punch.load
|
66
|
+
Punch.data.should == {}
|
67
|
+
end
|
68
|
+
|
69
|
+
it 'should return true' do
|
70
|
+
Punch.load.should == true
|
71
|
+
end
|
72
|
+
end
|
58
73
|
end
|
59
74
|
|
60
75
|
describe 'when no file is found' do
|
@@ -62,13 +77,13 @@ describe Punch do
|
|
62
77
|
File.stubs(:read).raises(Errno::ENOENT)
|
63
78
|
end
|
64
79
|
|
65
|
-
it 'should
|
80
|
+
it 'should set the data to an empty hash' do
|
66
81
|
Punch.load
|
67
|
-
Punch.data.should
|
82
|
+
Punch.data.should == {}
|
68
83
|
end
|
69
84
|
|
70
85
|
it 'should return false' do
|
71
|
-
Punch.load.should ==
|
86
|
+
Punch.load.should == true
|
72
87
|
end
|
73
88
|
end
|
74
89
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: one_inch_punch
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yossef Mendelssohn
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-11-
|
12
|
+
date: 2008-11-20 00:00:00 -06:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|