vinaigrette 0.0.2 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
data/lib/vinaigrette/version.rb
CHANGED
@@ -49,6 +49,14 @@ describe Vinaigrette::Base do
|
|
49
49
|
assert_equal({recipe_id: "MyRecipe"}, sauce.serializable_hash)
|
50
50
|
end
|
51
51
|
|
52
|
+
it 'should support access by name (needed by belongs_to)' do
|
53
|
+
DeliciousSauce.send(:attr_accessor, :recipe_id)
|
54
|
+
sauce = DeliciousSauce.new
|
55
|
+
sauce.recipe_id = 42
|
56
|
+
assert_equal(42, sauce[:recipe_id])
|
57
|
+
assert_equal(42, sauce['recipe_id'])
|
58
|
+
end
|
59
|
+
|
52
60
|
it 'should support vinaigrette_accessor' do
|
53
61
|
DeliciousSauce.send(:vinaigrette_accessor, :recipe_id, Integer)
|
54
62
|
sauce = DeliciousSauce.new
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vinaigrette
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.9.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-01-
|
12
|
+
date: 2013-01-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|