Browse files

Spec updated to test assigning different objects

  • Loading branch information...
1 parent c2f0735 commit 05c46f8a343227dc627292139477937084102fa1 @ledermann committed Mar 10, 2013
Showing with 12 additions and 5 deletions.
  1. +12 −5 spec/setting_object_spec.rb
View
17 spec/setting_object_spec.rb
@@ -40,11 +40,18 @@
new_setting_object.filter.should eq(false)
end
- it "should store to value hash" do
- new_setting_object.foo = 42
- new_setting_object.bar = 'hello'
-
- new_setting_object.value.should eq({'foo' => 42, 'bar' => 'hello'})
+ it "should store different objects to value hash" do
+ new_setting_object.integer = 42
+ new_setting_object.float = 1.234
+ new_setting_object.string = 'Hello, World!'
+ new_setting_object.array = [ 1,2,3 ]
+ new_setting_object.symbol = :foo
+
+ new_setting_object.value.should eq('integer' => 42,
+ 'float' => 1.234,
+ 'string' => 'Hello, World!',
+ 'array' => [ 1,2,3 ],
+ 'symbol' => :foo)
end
it "should set and return attributes" do

0 comments on commit 05c46f8

Please sign in to comment.