test/definition_test.rb in representable-1.7.3 vs test/definition_test.rb in representable-1.7.4
- old
+ new
@@ -41,12 +41,12 @@
it "responds to #setter" do
assert_equal :"songs=", @def.setter
end
- it "responds to #sought_type" do
- assert_equal nil, @def.sought_type
+ it "responds to #deserialize_class" do
+ assert_equal nil, @def.deserialize_class
end
describe "#clone" do
it "clones @options" do
@def.options[:volume] = 9
@@ -65,15 +65,10 @@
end
it "returns true if :default set" do
assert_equal true, Representable::Definition.new(:song, :default => nil).has_default?
end
-
- it "returns true if :collection" do
- assert_equal true, Representable::Definition.new(:songs, :collection => true).has_default?
- end
-
end
describe "#skipable_nil_value?" do
# default if skipable_nil_value?
@@ -206,25 +201,25 @@
it "responds to #array?" do
assert @def.array?
end
- it "responds to #sought_type" do
- assert_equal nil, @def.sought_type
+ it "responds to #deserialize_class" do
+ assert_equal nil, @def.deserialize_class
end
it "responds to #default" do
- assert_equal [], @def.send(:default)
+ assert_equal nil, @def.send(:default)
end
end
describe ":class => Item" do
before do
@def = Representable::Definition.new(:songs, :class => Hash)
end
- it "responds to #sought_type" do
- assert_equal Hash, @def.sought_type
+ it "responds to #deserialize_class" do
+ assert_equal Hash, @def.deserialize_class
end
end
describe ":default => value" do
it "responds to #default" do