dm-types 0.9.11 → 0.10.0
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/{History.txt → History.rdoc} +5 -4
- data/LICENSE +16 -14
- data/Manifest.txt +13 -3
- data/{README.txt → README.rdoc} +0 -0
- data/Rakefile +3 -4
- data/TODO +74 -0
- data/lib/dm-types.rb +15 -18
- data/lib/dm-types/bcrypt_hash.rb +1 -4
- data/lib/dm-types/comma_separated_list.rb +31 -0
- data/lib/dm-types/csv.rb +12 -18
- data/lib/dm-types/enum.rb +18 -15
- data/lib/dm-types/epoch_time.rb +6 -11
- data/lib/dm-types/file_path.rb +5 -4
- data/lib/dm-types/flag.rb +14 -13
- data/lib/dm-types/ip_address.rb +1 -0
- data/lib/dm-types/json.rb +5 -11
- data/lib/dm-types/regexp.rb +2 -3
- data/lib/dm-types/slug.rb +8 -17
- data/lib/dm-types/uri.rb +8 -14
- data/lib/dm-types/uuid.rb +9 -15
- data/lib/dm-types/version.rb +1 -1
- data/lib/dm-types/yaml.rb +4 -3
- data/spec/fixtures/article.rb +39 -0
- data/spec/fixtures/bookmark.rb +27 -0
- data/spec/fixtures/invention.rb +9 -0
- data/spec/fixtures/network_node.rb +40 -0
- data/spec/fixtures/person.rb +29 -0
- data/spec/fixtures/software_package.rb +37 -0
- data/spec/fixtures/ticket.rb +25 -0
- data/spec/fixtures/tshirt.rb +28 -0
- data/spec/integration/bcrypt_hash_spec.rb +37 -55
- data/spec/integration/comma_separated_list_spec.rb +89 -0
- data/spec/integration/enum_spec.rb +62 -42
- data/spec/integration/file_path_spec.rb +149 -17
- data/spec/integration/flag_spec.rb +56 -25
- data/spec/integration/ip_address_spec.rb +142 -17
- data/spec/integration/json_spec.rb +60 -17
- data/spec/integration/slug_spec.rb +39 -40
- data/spec/integration/uri_spec.rb +126 -21
- data/spec/integration/uuid_spec.rb +84 -30
- data/spec/integration/yaml_spec.rb +55 -25
- data/spec/shared/identity_function_group.rb +5 -0
- data/spec/spec.opts +1 -0
- data/spec/spec_helper.rb +49 -17
- data/spec/unit/bcrypt_hash_spec.rb +107 -64
- data/spec/unit/csv_spec.rb +111 -27
- data/spec/unit/enum_spec.rb +128 -87
- data/spec/unit/epoch_time_spec.rb +57 -32
- data/spec/unit/file_path_spec.rb +55 -34
- data/spec/unit/flag_spec.rb +102 -65
- data/spec/unit/ip_address_spec.rb +90 -40
- data/spec/unit/json_spec.rb +108 -41
- data/spec/unit/regexp_spec.rb +47 -17
- data/spec/unit/uri_spec.rb +57 -46
- data/spec/unit/yaml_spec.rb +91 -45
- data/tasks/install.rb +1 -1
- data/tasks/spec.rb +4 -4
- metadata +25 -32
- data/lib/dm-types/serial.rb +0 -8
data/spec/unit/file_path_spec.rb
CHANGED
@@ -1,49 +1,70 @@
|
|
1
|
-
require '
|
2
|
-
require Pathname(__FILE__).dirname.parent.expand_path + 'spec_helper'
|
1
|
+
require 'spec_helper'
|
3
2
|
|
4
|
-
|
3
|
+
try_spec do
|
4
|
+
describe DataMapper::Types::FilePath do
|
5
|
+
before do
|
6
|
+
@input = '/usr/bin/ruby'
|
7
|
+
@path = Pathname.new(@input)
|
8
|
+
end
|
5
9
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
+
describe '.dump' do
|
11
|
+
describe 'when input is a string' do
|
12
|
+
it 'does not modify input' do
|
13
|
+
DataMapper::Types::FilePath.dump(@input, :property).should == @input
|
14
|
+
end
|
15
|
+
end
|
10
16
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
17
|
+
describe 'when input is nil' do
|
18
|
+
it 'returns nil' do
|
19
|
+
DataMapper::Types::FilePath.dump(nil, :property).should be_nil
|
20
|
+
end
|
21
|
+
end
|
15
22
|
|
16
|
-
|
17
|
-
|
23
|
+
describe 'when input is a blank string' do
|
24
|
+
it 'returns nil' do
|
25
|
+
DataMapper::Types::FilePath.dump('', :property).should be_nil
|
26
|
+
end
|
27
|
+
end
|
18
28
|
end
|
19
29
|
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
30
|
+
describe '.load' do
|
31
|
+
describe 'when value is a non-blank file path' do
|
32
|
+
it 'returns Pathname for a path' do
|
33
|
+
DataMapper::Types::FilePath.load(@input, :property).should == @path
|
34
|
+
end
|
35
|
+
end
|
24
36
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
37
|
+
describe 'when value is nil' do
|
38
|
+
it 'return nil' do
|
39
|
+
DataMapper::Types::FilePath.load(nil, :property).should be_nil
|
40
|
+
end
|
41
|
+
end
|
29
42
|
|
30
|
-
|
31
|
-
|
43
|
+
describe 'when value is a blank string' do
|
44
|
+
it 'returns nil' do
|
45
|
+
DataMapper::Types::FilePath.load('', :property).should be_nil
|
46
|
+
end
|
47
|
+
end
|
32
48
|
end
|
33
49
|
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
50
|
+
describe '.typecast' do
|
51
|
+
describe 'when a Pathname is given' do
|
52
|
+
it 'does not modify input' do
|
53
|
+
DataMapper::Types::FilePath.typecast(@path, :property).should == @path
|
54
|
+
end
|
55
|
+
end
|
38
56
|
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
57
|
+
describe 'when a nil is given' do
|
58
|
+
it 'does not modify input' do
|
59
|
+
DataMapper::Types::FilePath.typecast(nil, :property).should == nil
|
60
|
+
end
|
61
|
+
end
|
43
62
|
|
44
|
-
|
45
|
-
|
46
|
-
|
63
|
+
describe 'when a string is given' do
|
64
|
+
it 'returns Pathname for given path' do
|
65
|
+
DataMapper::Types::FilePath.typecast(@input, :property).should == @path
|
66
|
+
end
|
67
|
+
end
|
47
68
|
end
|
48
69
|
end
|
49
70
|
end
|
data/spec/unit/flag_spec.rb
CHANGED
@@ -1,86 +1,123 @@
|
|
1
|
-
require '
|
2
|
-
require Pathname(__FILE__).dirname.parent.expand_path + 'spec_helper'
|
1
|
+
require 'spec_helper'
|
3
2
|
|
4
|
-
describe
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
DataMapper::Types::Flag.new.should be_instance_of(Class)
|
9
|
-
end
|
10
|
-
|
11
|
-
it "should create unique a Class each call" do
|
12
|
-
DataMapper::Types::Flag.new.should_not == DataMapper::Types::Flag.new
|
13
|
-
end
|
3
|
+
describe 'factory method for Flag type', :shared => true do
|
4
|
+
it 'creates a Class' do
|
5
|
+
DataMapper::Types::Flag.new.should be_instance_of(Class)
|
6
|
+
end
|
14
7
|
|
15
|
-
|
16
|
-
|
17
|
-
|
8
|
+
it 'creates unique a Class each call' do
|
9
|
+
DataMapper::Types::Flag.new.should_not == DataMapper::Types::Flag.new
|
10
|
+
end
|
18
11
|
|
19
|
-
|
20
|
-
|
21
|
-
end
|
12
|
+
it 'builds up flags map from arguments' do
|
13
|
+
DataMapper::Types::Flag.new(:first, :second, :third).flag_map.values.should == [ :first, :second, :third ]
|
22
14
|
end
|
23
15
|
|
24
|
-
|
25
|
-
|
26
|
-
DataMapper::Types::Flag.should_receive(:new).with(:uno, :dos, :tres)
|
27
|
-
DataMapper::Types::Flag[:uno, :dos, :tres]
|
28
|
-
end
|
16
|
+
it 'should create keys that is +1 for every increment for the @flag_map hash, staring at 0' do
|
17
|
+
DataMapper::Types::Flag.new(:one, :two, :three, :four, :five).flag_map.keys.should include(0, 1, 2, 3, 4)
|
29
18
|
end
|
19
|
+
end
|
30
20
|
|
31
|
-
|
32
|
-
|
33
|
-
|
21
|
+
try_spec do
|
22
|
+
describe DataMapper::Types::Flag do
|
23
|
+
describe '.new' do
|
24
|
+
it_should_behave_like 'factory method for Flag type'
|
34
25
|
end
|
35
26
|
|
36
|
-
|
37
|
-
|
38
|
-
@flag.dump(:second, :property).should == 2
|
39
|
-
@flag.dump(:third, :property).should == 4
|
40
|
-
@flag.dump(:fourth, :property).should == 8
|
41
|
-
@flag.dump(:fifth, :property).should == 16
|
27
|
+
describe '.[]' do
|
28
|
+
it_should_behave_like 'factory method for Flag type'
|
42
29
|
end
|
43
30
|
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
end
|
31
|
+
describe '.dump' do
|
32
|
+
before :all do
|
33
|
+
@flag = DataMapper::Types::Flag[:first, :second, :third, :fourth, :fifth]
|
34
|
+
end
|
49
35
|
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
end
|
36
|
+
describe 'when argument matches a value in the flag map' do
|
37
|
+
before :all do
|
38
|
+
@result = @flag.dump(:first, :property)
|
39
|
+
end
|
55
40
|
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
41
|
+
it 'returns flag bit of value' do
|
42
|
+
@result.should == 1
|
43
|
+
end
|
44
|
+
end
|
60
45
|
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
46
|
+
describe 'when argument matches 2nd value in the flag map' do
|
47
|
+
before :all do
|
48
|
+
@result = @flag.dump(:second, :property)
|
49
|
+
end
|
65
50
|
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
51
|
+
it 'returns flag bit of value' do
|
52
|
+
@result.should == 2
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
describe 'when argument matches multiple Symbol values in the flag map' do
|
57
|
+
before :all do
|
58
|
+
@result = @flag.dump([ :second, :fourth ], :property)
|
59
|
+
end
|
60
|
+
|
61
|
+
it 'builds binary flag from key values of all matches' do
|
62
|
+
@result.should == 10
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
describe 'when argument matches multiple string values in the flag map' do
|
67
|
+
before :all do
|
68
|
+
@result = @flag.dump(['first', 'second', 'third', 'fourth', 'fifth'], :property)
|
69
|
+
end
|
70
|
+
|
71
|
+
it 'builds binary flag from key values of all matches' do
|
72
|
+
@result.should == 31
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
76
|
+
describe 'when argument does not match a single value in the flag map' do
|
77
|
+
before :all do
|
78
|
+
@result = @flag.dump(:zero, :property)
|
79
|
+
end
|
73
80
|
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
81
|
+
it 'returns zero' do
|
82
|
+
@result.should == 0
|
83
|
+
end
|
84
|
+
end
|
78
85
|
end
|
79
86
|
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
87
|
+
describe '.load' do
|
88
|
+
before :all do
|
89
|
+
@flag = DataMapper::Types::Flag[:uno, :dos, :tres, :cuatro, :cinco]
|
90
|
+
end
|
91
|
+
|
92
|
+
describe 'when argument matches a key in the flag map' do
|
93
|
+
before :all do
|
94
|
+
@result = @flag.load(4, :property)
|
95
|
+
end
|
96
|
+
|
97
|
+
it 'returns array with a single matching element' do
|
98
|
+
@result.should == [ :tres ]
|
99
|
+
end
|
100
|
+
end
|
101
|
+
|
102
|
+
describe 'when argument matches multiple keys in the flag map' do
|
103
|
+
before :all do
|
104
|
+
@result = @flag.load(10, :property)
|
105
|
+
end
|
106
|
+
|
107
|
+
it 'returns array of matching values' do
|
108
|
+
@result.should == [ :dos, :cuatro ]
|
109
|
+
end
|
110
|
+
end
|
111
|
+
|
112
|
+
describe 'when argument does not match a single key in the flag map' do
|
113
|
+
before :all do
|
114
|
+
@result = @flag.load(nil, :property)
|
115
|
+
end
|
116
|
+
|
117
|
+
it 'returns an empty array' do
|
118
|
+
@result.should == []
|
119
|
+
end
|
120
|
+
end
|
84
121
|
end
|
85
122
|
end
|
86
123
|
end
|
@@ -1,56 +1,106 @@
|
|
1
|
-
require '
|
2
|
-
require Pathname(__FILE__).dirname.parent.expand_path + 'spec_helper'
|
1
|
+
require 'spec_helper'
|
3
2
|
|
4
|
-
|
3
|
+
try_spec do
|
4
|
+
describe DataMapper::Types::IPAddress do
|
5
|
+
before :all do
|
6
|
+
@stored = '81.20.130.1'
|
7
|
+
@input = IPAddr.new(@stored)
|
8
|
+
end
|
5
9
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
+
describe '.dump' do
|
11
|
+
describe 'when argument is an IP address given as Ruby object' do
|
12
|
+
before :all do
|
13
|
+
@result = DataMapper::Types::IPAddress.dump(@input, :property)
|
14
|
+
end
|
10
15
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
16
|
+
it 'dumps input into a string' do
|
17
|
+
@result.should == @stored
|
18
|
+
end
|
19
|
+
end
|
15
20
|
|
16
|
-
|
17
|
-
|
18
|
-
|
21
|
+
describe 'when argument is nil' do
|
22
|
+
before :all do
|
23
|
+
@result = DataMapper::Types::IPAddress.dump(nil, :property)
|
24
|
+
end
|
19
25
|
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
26
|
+
it 'returns nil' do
|
27
|
+
@result.should be_nil
|
28
|
+
end
|
29
|
+
end
|
24
30
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
31
|
+
describe 'when input is a blank string' do
|
32
|
+
before :all do
|
33
|
+
@result = DataMapper::Types::IPAddress.dump('', :property)
|
34
|
+
end
|
29
35
|
|
30
|
-
|
31
|
-
|
36
|
+
it 'retuns a blank string' do
|
37
|
+
@result.should == ''
|
38
|
+
end
|
39
|
+
end
|
32
40
|
end
|
33
41
|
|
34
|
-
|
35
|
-
|
36
|
-
|
42
|
+
describe '.load' do
|
43
|
+
describe 'when argument is a valid IP address as a string' do
|
44
|
+
before :all do
|
45
|
+
@result = DataMapper::Types::IPAddress.load(@stored, :property)
|
46
|
+
end
|
37
47
|
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
end
|
43
|
-
end
|
48
|
+
it 'returns IPAddr instance from stored value' do
|
49
|
+
@result.should == @input
|
50
|
+
end
|
51
|
+
end
|
44
52
|
|
45
|
-
|
46
|
-
|
47
|
-
|
53
|
+
describe 'when argument is nil' do
|
54
|
+
before :all do
|
55
|
+
@result = DataMapper::Types::IPAddress.load(nil, :property)
|
56
|
+
end
|
57
|
+
|
58
|
+
it 'returns nil' do
|
59
|
+
@result.should be_nil
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
describe 'when argument is a blank string' do
|
64
|
+
before :all do
|
65
|
+
@result = DataMapper::Types::IPAddress.load('', :property)
|
66
|
+
end
|
67
|
+
|
68
|
+
it 'returns IPAddr instance from stored value' do
|
69
|
+
@result.should == IPAddr.new('0.0.0.0')
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
describe 'when argument is an Array instance' do
|
74
|
+
before :all do
|
75
|
+
@operation = lambda { DataMapper::Types::IPAddress.load([], :property) }
|
76
|
+
end
|
77
|
+
|
78
|
+
it 'raises ArgumentError with a meaningful message' do
|
79
|
+
@operation.should raise_error(ArgumentError, '+value+ must be nil or a String')
|
80
|
+
end
|
81
|
+
end
|
48
82
|
end
|
49
83
|
|
50
|
-
|
51
|
-
|
52
|
-
|
84
|
+
describe '.typecast' do
|
85
|
+
describe 'when argument is an IpAddr object' do
|
86
|
+
before :all do
|
87
|
+
@result = DataMapper::Types::IPAddress.typecast(@input, :property)
|
88
|
+
end
|
89
|
+
|
90
|
+
it 'does not change the value' do
|
91
|
+
@result.should == @input
|
92
|
+
end
|
93
|
+
end
|
94
|
+
|
95
|
+
describe 'when argument is a valid IP address as a string' do
|
96
|
+
before :all do
|
97
|
+
@result = DataMapper::Types::IPAddress.typecast(@stored, :property)
|
98
|
+
end
|
99
|
+
|
100
|
+
it 'instantiates IPAddr instance' do
|
101
|
+
@result.should == @input
|
102
|
+
end
|
103
|
+
end
|
53
104
|
end
|
54
105
|
end
|
55
|
-
|
56
106
|
end
|
data/spec/unit/json_spec.rb
CHANGED
@@ -1,53 +1,120 @@
|
|
1
|
-
require '
|
2
|
-
require
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'shared/identity_function_group'
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
4
|
+
try_spec do
|
5
|
+
describe DataMapper::Types::Json do
|
6
|
+
describe '.load' do
|
7
|
+
describe 'when nil is provided' do
|
8
|
+
it 'returns nil' do
|
9
|
+
DataMapper::Types::Json.load(nil, :property).should be_nil
|
10
|
+
end
|
11
|
+
end
|
8
12
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
+
describe 'when Json encoded primitive string is provided' do
|
14
|
+
it 'returns decoded value as Ruby string' do
|
15
|
+
DataMapper::Types::Json.load(JSON.dump(:value => 'JSON encoded string'), :property).should == { 'value' => 'JSON encoded string' }
|
16
|
+
end
|
17
|
+
end
|
13
18
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
end
|
19
|
+
describe 'when something else is provided' do
|
20
|
+
it 'raises ArgumentError with a meaningful message' do
|
21
|
+
lambda {
|
22
|
+
DataMapper::Types::Json.load(:sym, :property)
|
23
|
+
}.should raise_error(ArgumentError, '+value+ of a property of JSON type must be nil or a String')
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
20
27
|
|
21
|
-
describe
|
22
|
-
|
23
|
-
|
24
|
-
|
28
|
+
describe '.dump' do
|
29
|
+
describe 'when nil is provided' do
|
30
|
+
it 'returns nil' do
|
31
|
+
DataMapper::Types::Json.dump(nil, :property).should be_nil
|
32
|
+
end
|
33
|
+
end
|
25
34
|
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
35
|
+
describe 'when Json encoded primitive string is provided' do
|
36
|
+
it 'does not do double encoding' do
|
37
|
+
DataMapper::Types::Json.dump('Json encoded string', :property).should == 'Json encoded string'
|
38
|
+
end
|
39
|
+
end
|
30
40
|
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
end
|
41
|
+
describe 'when regular Ruby string is provided' do
|
42
|
+
it 'dumps argument to Json' do
|
43
|
+
DataMapper::Types::Json.dump('dump me (to JSON)', :property).should == 'dump me (to JSON)'
|
44
|
+
end
|
45
|
+
end
|
36
46
|
|
37
|
-
describe
|
38
|
-
|
39
|
-
|
47
|
+
describe 'when Ruby array is provided' do
|
48
|
+
it 'dumps argument to Json' do
|
49
|
+
DataMapper::Types::Json.dump([1, 2, 3], :property).should == '[1,2,3]'
|
50
|
+
end
|
51
|
+
end
|
40
52
|
|
41
|
-
|
42
|
-
|
53
|
+
describe 'when Ruby hash is provided' do
|
54
|
+
it 'dumps argument to Json' do
|
55
|
+
DataMapper::Types::Json.dump({ :datamapper => 'Data access layer in Ruby' }, :property).
|
56
|
+
should == '{"datamapper":"Data access layer in Ruby"}'
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
43
60
|
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
61
|
+
describe '.typecast' do
|
62
|
+
class SerializeMe
|
63
|
+
attr_accessor :name
|
64
|
+
end
|
65
|
+
|
66
|
+
describe 'when given instance of a Hash' do
|
67
|
+
before :all do
|
68
|
+
@input = { :library => 'DataMapper' }
|
69
|
+
|
70
|
+
@result = DataMapper::Types::Json.typecast(@input, :property)
|
71
|
+
end
|
72
|
+
|
73
|
+
it_should_behave_like 'identity function'
|
74
|
+
end
|
75
|
+
|
76
|
+
describe 'when given instance of an Array' do
|
77
|
+
before :all do
|
78
|
+
@input = %w[ dm-core dm-more ]
|
79
|
+
|
80
|
+
@result = DataMapper::Types::Json.typecast(@input, :property)
|
81
|
+
end
|
82
|
+
|
83
|
+
it_should_behave_like 'identity function'
|
84
|
+
end
|
85
|
+
|
86
|
+
describe 'when given nil' do
|
87
|
+
before :all do
|
88
|
+
@input = nil
|
89
|
+
|
90
|
+
@result = DataMapper::Types::Json.typecast(@input, :property)
|
91
|
+
end
|
92
|
+
|
93
|
+
it_should_behave_like 'identity function'
|
94
|
+
end
|
95
|
+
|
96
|
+
describe 'when given JSON encoded value' do
|
97
|
+
before :all do
|
98
|
+
@input = '{ "value": 11 }'
|
99
|
+
|
100
|
+
@result = DataMapper::Types::Json.typecast(@input, :property)
|
101
|
+
end
|
102
|
+
|
103
|
+
it 'decodes value from JSON' do
|
104
|
+
@result.should == { 'value' => 11 }
|
105
|
+
end
|
106
|
+
end
|
107
|
+
|
108
|
+
describe 'when given instance of a custom class' do
|
109
|
+
before :all do
|
110
|
+
@input = SerializeMe.new
|
111
|
+
@input.name = 'Hello!'
|
112
|
+
|
113
|
+
# @result = DataMapper::Types::Json.typecast(@input, :property)
|
114
|
+
end
|
48
115
|
|
49
|
-
|
50
|
-
|
51
|
-
|
116
|
+
it 'attempts to load value from JSON string'
|
117
|
+
end
|
118
|
+
end
|
52
119
|
end
|
53
120
|
end
|