cowtech-extensions 2.7.1 → 2.7.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. data/.gitignore +1 -0
  2. data/.travis.yml +4 -2
  3. data/README.md +4 -1
  4. data/doc/Cowtech.html +2 -2
  5. data/doc/Cowtech/Extensions.html +96 -93
  6. data/doc/Cowtech/Extensions/Boolean.html +10 -8
  7. data/doc/Cowtech/Extensions/DateTime.html +58 -52
  8. data/doc/Cowtech/Extensions/DateTime/ClassMethods.html +91 -79
  9. data/doc/Cowtech/Extensions/Exceptions.html +2 -2
  10. data/doc/Cowtech/Extensions/Exceptions/Dump.html +2 -2
  11. data/doc/Cowtech/Extensions/Hash.html +20 -18
  12. data/doc/Cowtech/Extensions/Math.html +2 -2
  13. data/doc/Cowtech/Extensions/Math/ClassMethods.html +24 -22
  14. data/doc/Cowtech/Extensions/Object.html +95 -81
  15. data/doc/Cowtech/Extensions/Pathname.html +11 -10
  16. data/doc/Cowtech/Extensions/Settings.html +80 -70
  17. data/doc/Cowtech/Extensions/String.html +26 -22
  18. data/doc/Cowtech/Extensions/TimeZone.html +98 -86
  19. data/doc/Cowtech/Extensions/TimeZone/ClassMethods.html +79 -72
  20. data/doc/Cowtech/Extensions/Version.html +11 -7
  21. data/doc/_index.html +2 -2
  22. data/doc/file.README.html +9 -6
  23. data/doc/index.html +9 -6
  24. data/doc/top-level-namespace.html +2 -2
  25. data/lib/cowtech-extensions.rb +2 -1
  26. data/lib/cowtech-extensions/version.rb +2 -2
  27. data/spec/cowtech-extensions/boolean_spec.rb +9 -4
  28. data/spec/cowtech-extensions/datetime_spec.rb +106 -100
  29. data/spec/cowtech-extensions/hash_spec.rb +4 -4
  30. data/spec/cowtech-extensions/math_spec.rb +8 -8
  31. data/spec/cowtech-extensions/object_spec.rb +115 -103
  32. data/spec/cowtech-extensions/pathname_spec.rb +3 -1
  33. data/spec/cowtech-extensions/settings_spec.rb +30 -30
  34. data/spec/cowtech-extensions/string_spec.rb +13 -7
  35. data/spec/cowtech-extensions_spec.rb +21 -11
  36. data/spec/spec_helper.rb +7 -1
  37. metadata +4 -4
@@ -17,23 +17,29 @@ describe Cowtech::Extensions::String do
17
17
  end
18
18
 
19
19
  describe "#remove_accents" do
20
- it "should translate accents" do reference.remove_accents.should == translated_reference end
20
+ it "should translate accents" do
21
+ expect(reference.remove_accents).to eq(translated_reference)
22
+ end
21
23
  end
22
24
 
23
25
  describe "#untitleize" do
24
- it "should convert spaces to dashes" do reference.untitleize.should == untitleized_reference end
26
+ it "should convert spaces to dashes" do
27
+ expect(reference.untitleize).to eq(untitleized_reference)
28
+ end
25
29
  end
26
30
 
27
31
  describe "#replace_ampersands" do
28
- it "should remove HTML ampersands" do reference.replace_ampersands.should == amp_reference end
32
+ it "should remove HTML ampersands" do
33
+ expect(reference.replace_ampersands).to eq(amp_reference)
34
+ end
29
35
  end
30
36
 
31
37
  describe "#value" do
32
38
  it "should return the string itself" do
33
- reference.value.should == reference
34
- translated_reference.value.should == translated_reference
35
- untitleized_reference.value.should == untitleized_reference
36
- amp_reference.value.should == amp_reference
39
+ expect(reference.value).to eq(reference)
40
+ expect(translated_reference.value).to eq(translated_reference)
41
+ expect(untitleized_reference.value).to eq(untitleized_reference)
42
+ expect(amp_reference.value).to eq(amp_reference)
37
43
  end
38
44
  end
39
45
  end
@@ -6,7 +6,7 @@ describe Cowtech::Extensions do
6
6
  original_ruby_version = RUBY_VERSION
7
7
 
8
8
  ::Kernel::silence_warnings { Object.const_set("RUBY_VERSION", "1.8.7") }
9
- ::Cowtech::Extensions.is_ruby_18?.should be_true
9
+ expect(::Cowtech::Extensions.is_ruby_18?).to be_true
10
10
  ::Kernel::silence_warnings { Object.const_set("RUBY_VERSION", original_ruby_version) }
11
11
  end
12
12
 
@@ -14,7 +14,7 @@ describe Cowtech::Extensions do
14
14
  original_ruby_version = RUBY_VERSION
15
15
 
16
16
  ::Kernel::silence_warnings { Object.const_set("RUBY_VERSION", "1.9.3") }
17
- ::Cowtech::Extensions.is_ruby_18?.should be_false
17
+ expect(::Cowtech::Extensions.is_ruby_18?).to be_false
18
18
  ::Kernel::silence_warnings { Object.const_set("RUBY_VERSION", original_ruby_version) }
19
19
  end
20
20
  end
@@ -24,24 +24,34 @@ describe Cowtech::Extensions do
24
24
  ::Cowtech::Extensions.load!
25
25
 
26
26
  it "for Boolean" do
27
- true.should respond_to("value")
28
- true.should respond_to("to_i")
27
+ expect(true).to respond_to("value")
28
+ expect(true).to respond_to("to_i")
29
29
  end
30
30
 
31
31
  it "for DateTime" do
32
- ::DateTime.should respond_to("custom_format")
33
- ::DateTime.now.should respond_to("lstrftime")
32
+ expect(::DateTime).to respond_to("custom_format")
33
+ expect(::DateTime.now).to respond_to("lstrftime")
34
34
  end
35
35
 
36
- it "for Hash" do {:a => "b"}.should respond_to("a") end
36
+ it "for Hash" do
37
+ expect({:a => "b"}).to respond_to("a")
38
+ end
37
39
 
38
- it "for Math" do ::Math.should respond_to("min") end
40
+ it "for Math" do
41
+ expect(::Math).to respond_to("min")
42
+ end
39
43
 
40
- it "for Object" do 0.should respond_to("debug_dump") end
44
+ it "for Object" do
45
+ expect(0).to respond_to("debug_dump")
46
+ end
41
47
 
42
- it "for Pathname" do ::Pathname.new($0).should respond_to("components") end
48
+ it "for Pathname" do
49
+ expect(::Pathname.new($0)).to respond_to("components")
50
+ end
43
51
 
44
- it "for String" do "".should respond_to("remove_accents") end
52
+ it "for String" do
53
+ expect("").to respond_to("remove_accents")
54
+ end
45
55
  end
46
56
  end
47
57
  end
data/spec/spec_helper.rb CHANGED
@@ -7,4 +7,10 @@
7
7
  require "rubygems"
8
8
  require "coverage_helper"
9
9
  require "bundler/setup"
10
- require "cowtech-extensions"
10
+ require "cowtech-extensions"
11
+
12
+ RSpec.configure do |config|
13
+ config.expect_with :rspec do |c|
14
+ c.syntax = :expect
15
+ end
16
+ end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cowtech-extensions
3
3
  version: !ruby/object:Gem::Version
4
- hash: 17
4
+ hash: 23
5
5
  prerelease:
6
6
  segments:
7
7
  - 2
8
8
  - 7
9
- - 1
10
- version: 2.7.1
9
+ - 2
10
+ version: 2.7.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Shogun
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-07-24 00:00:00 Z
18
+ date: 2012-07-28 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  version_requirements: &id001 !ruby/object:Gem::Requirement