Sha256: de8996dd80aae2e0cd8f32012688f77a55134786ad689931a0699e591e0f48fb
Contents?: true
Size: 761 Bytes
Versions: 8
Compression:
Stored size: 761 Bytes
Contents
require 'test_helper' class FieldsTest < MiniTest::Spec describe "#new" do it "accepts list of properties" do fields = Reform::Contract::Fields.new([:name, :title]) fields.name.must_equal nil fields.title.must_equal nil end it "accepts list of properties and values" do fields = Reform::Contract::Fields.new(["name", "title"], "title" => "The Body") fields.name.must_equal nil fields.title.must_equal "The Body" end it "processes value syms" do skip "we don't need to test this as representer.to_hash always returns strings" fields = Reform::Fields.new(["name", "title"], :title => "The Body") fields.name.must_equal nil fields.title.must_equal "The Body" end end end
Version data entries
8 entries across 8 versions & 1 rubygems