holiday_tools 0.0.6 → 0.0.7
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.
- data/Gemfile +6 -0
- data/Guardfile +2 -3
- data/lib/holiday_tools/version.rb +1 -1
- data/spec/holiday_tools/locator_spec.rb +22 -0
- data/spec/holiday_tools_spec.rb +2 -18
- data/spec/spec_helper.rb +1 -0
- metadata +3 -1
data/Gemfile
CHANGED
data/Guardfile
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
# A sample Guardfile
|
2
1
|
# More info at https://github.com/guard/guard#readme
|
3
2
|
|
4
3
|
guard 'bundler' do
|
@@ -9,8 +8,8 @@ end
|
|
9
8
|
|
10
9
|
guard :rspec do
|
11
10
|
watch(%r{^spec/.+_spec\.rb$})
|
12
|
-
watch(%r{^lib/(.+)\.rb$})
|
11
|
+
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
|
13
12
|
watch('spec/spec_helper.rb') { "spec" }
|
14
13
|
end
|
15
14
|
|
16
|
-
notification :
|
15
|
+
notification :growl
|
@@ -0,0 +1,22 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe HolidayTools do
|
4
|
+
it 'should deliver the new years day for Austria' do
|
5
|
+
date = Date.new(2013, 01, 01)
|
6
|
+
filter = ['at']
|
7
|
+
holidays = HolidayTools::Locator.new(filter)
|
8
|
+
answer = holidays.show_holiday(date)
|
9
|
+
answer.size.should == 3
|
10
|
+
answer[0].should =~ /Tuesday/
|
11
|
+
answer[1].should =~ /Neujahrstag/
|
12
|
+
answer[2].should =~ /Austria/
|
13
|
+
end
|
14
|
+
|
15
|
+
it 'should deliver the whole year for all regions' do
|
16
|
+
date = Date.new(2013, 01, 01)
|
17
|
+
holidays = HolidayTools::Locator.new
|
18
|
+
answer = holidays.show_year(date)
|
19
|
+
#puts answer[0]
|
20
|
+
answer.flatten!.size.should == 909
|
21
|
+
end
|
22
|
+
end
|
data/spec/holiday_tools_spec.rb
CHANGED
@@ -1,23 +1,7 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
describe HolidayTools do
|
4
|
-
it 'should
|
5
|
-
|
6
|
-
filter = ['at']
|
7
|
-
holidays = HolidayTools::Locator.new(filter)
|
8
|
-
answer = holidays.show_holiday(date)
|
9
|
-
answer.size.should == 3
|
10
|
-
answer[0].should =~ /Tuesday/
|
11
|
-
answer[1].should =~ /Neujahrstag/
|
12
|
-
answer[2].should =~ /Austria/
|
4
|
+
it 'should execute the corresponding -spec file' do
|
5
|
+
true
|
13
6
|
end
|
14
|
-
|
15
|
-
it 'should deliver the whole year for all regions' do
|
16
|
-
date = Date.new(2013, 01, 01)
|
17
|
-
holidays = HolidayTools::Locator.new
|
18
|
-
answer = holidays.show_year(date)
|
19
|
-
#puts answer[0]
|
20
|
-
answer.flatten!.size.should == 909
|
21
|
-
end
|
22
|
-
|
23
7
|
end
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: holiday_tools
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -64,6 +64,7 @@ files:
|
|
64
64
|
- lib/holiday_tools.rb
|
65
65
|
- lib/holiday_tools/locator.rb
|
66
66
|
- lib/holiday_tools/version.rb
|
67
|
+
- spec/holiday_tools/locator_spec.rb
|
67
68
|
- spec/holiday_tools_spec.rb
|
68
69
|
- spec/spec_helper.rb
|
69
70
|
- x
|
@@ -92,5 +93,6 @@ signing_key:
|
|
92
93
|
specification_version: 3
|
93
94
|
summary: Select date, period and regions for public holidays
|
94
95
|
test_files:
|
96
|
+
- spec/holiday_tools/locator_spec.rb
|
95
97
|
- spec/holiday_tools_spec.rb
|
96
98
|
- spec/spec_helper.rb
|