add mini test for volatile functionality

This commit is contained in:
Torsten Ruger 2015-06-15 08:26:56 +03:00
parent 037f8d80d2
commit 4853f944ef
1 changed files with 7 additions and 1 deletions

View File

@ -3,9 +3,10 @@ class ObjectWithAttributes
@name = "some name"
@number = 1234
end
attr_accessor :extra
attr_accessor :extra , :volotile
end
OBJECT_STRING = "ObjectWithAttributes(:name => 'some name', :number => 1234)"
Sof::Volotile.add(ObjectWithAttributes , [:volotile])
class ObjectSof < MiniTest::Test
include Checker
@ -48,6 +49,11 @@ class ObjectSof < MiniTest::Test
@out = object
check "ObjectWithAttributes(:name => 'some name', :number => 1234, :extra => Object())"
end
def test_volotile
@out = ObjectWithAttributes.new
@out.volotile = 42
check "ObjectWithAttributes(:name => 'some name', :number => 1234)"
end
def test_class
@out = ObjectWithAttributes
check "ObjectWithAttributes"