chrislloyd-fancypath 0.5.1 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/lib/fancypath.rb +5 -0
- data/spec/fancypath_spec.rb +16 -0
- metadata +2 -2
data/Rakefile
CHANGED
data/lib/fancypath.rb
CHANGED
data/spec/fancypath_spec.rb
CHANGED
@@ -67,6 +67,22 @@ describe '#copy' do
|
|
67
67
|
|
68
68
|
end
|
69
69
|
|
70
|
+
describe '#set_extension' do
|
71
|
+
|
72
|
+
example "file without extension" do
|
73
|
+
Fancypath('/tmp/foo').set_extension('rb').should == Fancypath('/tmp/foo.rb')
|
74
|
+
end
|
75
|
+
|
76
|
+
example "single extension" do
|
77
|
+
Fancypath('/tmp/foo.py').set_extension('rb').should == Fancypath('/tmp/foo.rb')
|
78
|
+
end
|
79
|
+
|
80
|
+
example "multi extension" do
|
81
|
+
Fancypath('/tmp/foo.py.z').set_extension('rb').should == Fancypath('/tmp/foo.py.rb')
|
82
|
+
end
|
83
|
+
|
84
|
+
end
|
85
|
+
|
70
86
|
end #/Fancypath
|
71
87
|
|
72
88
|
describe "String#to_path" do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chrislloyd-fancypath
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Myles Byrne
|
@@ -10,7 +10,7 @@ autorequire: fancypath
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date:
|
13
|
+
date: 2009-02-02 00:00:00 -08:00
|
14
14
|
default_executable:
|
15
15
|
dependencies: []
|
16
16
|
|