ns-options 1.1.4 → 1.1.5
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/ns-options/assert_macros.rb +1 -1
- data/lib/ns-options/option.rb +1 -1
- data/lib/ns-options/version.rb +1 -1
- data/test/unit/namespace_tests.rb +10 -0
- metadata +8 -8
data/lib/ns-options/option.rb
CHANGED
data/lib/ns-options/version.rb
CHANGED
@@ -114,6 +114,16 @@ class NsOptions::Namespace
|
|
114
114
|
assert_included 'test/unit/namespace_tests.rb:', err.backtrace.first
|
115
115
|
end
|
116
116
|
|
117
|
+
should "only raise CeorceError when StandardExceptions are raised writing values" do
|
118
|
+
subject.option('symbol', Symbol)
|
119
|
+
|
120
|
+
std_err_class = Class.new{ def to_sym; raise StandardError; end }
|
121
|
+
sig_err_class = Class.new{ def to_sym; raise SignalException, 'INT'; end }
|
122
|
+
|
123
|
+
assert_raises(NsOptions::Option::CoerceError){ subject.symbol = std_err_class.new }
|
124
|
+
assert_raises(SignalException){ subject.symbol = sig_err_class.new }
|
125
|
+
end
|
126
|
+
|
117
127
|
end
|
118
128
|
|
119
129
|
class NamespaceTests < BaseTests
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ns-options
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 25
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 1.1.
|
9
|
+
- 5
|
10
|
+
version: 1.1.5
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Collin Redding
|
@@ -16,11 +16,12 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2013-
|
19
|
+
date: 2013-10-29 00:00:00 Z
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
22
|
+
name: assert
|
22
23
|
prerelease: false
|
23
|
-
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
24
25
|
none: false
|
25
26
|
requirements:
|
26
27
|
- - ~>
|
@@ -30,9 +31,8 @@ dependencies:
|
|
30
31
|
- 2
|
31
32
|
- 0
|
32
33
|
version: "2.0"
|
33
|
-
requirement: *id001
|
34
|
-
name: assert
|
35
34
|
type: :development
|
35
|
+
version_requirements: *id001
|
36
36
|
description: A DSL for defining, organizing and accessing options.
|
37
37
|
email:
|
38
38
|
- collin.redding@me.com
|
@@ -116,7 +116,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
116
116
|
requirements: []
|
117
117
|
|
118
118
|
rubyforge_project:
|
119
|
-
rubygems_version: 1.8.
|
119
|
+
rubygems_version: 1.8.24
|
120
120
|
signing_key:
|
121
121
|
specification_version: 3
|
122
122
|
summary: A DSL for defining, organizing and accessing options.
|