test/test_helper.rb in reform-2.3.3 vs test/test_helper.rb in reform-2.5.0

- old
+ new

@@ -15,18 +15,13 @@ class TestContract < Reform::Contract feature Reform::Form::Dry end module Types - DRY_MODULE = Gem::Version.new(Dry::Types::VERSION) < Gem::Version.new("0.15.0") ? Dry::Types.module : Dry.Types() - include DRY_MODULE + include Dry.Types() end -DRY_TYPES_VERSION = Gem::Version.new(Dry::Types::VERSION) -DRY_TYPES_CONSTANT = DRY_TYPES_VERSION < Gem::Version.new("0.13.0") ? Types::Form : Types::Params -DRY_TYPES_INT_CONSTANT = DRY_TYPES_VERSION < Gem::Version.new("0.13.0") ? Types::Form::Int : Types::Params::Integer - class BaseTest < MiniTest::Spec class AlbumForm < TestForm property :title property :hit do @@ -46,9 +41,13 @@ let(:hit) { Song.new("Roxanne") } end MiniTest::Spec.class_eval do + Song = Struct.new(:title, :album, :composer) + Album = Struct.new(:name, :songs, :artist) + Artist = Struct.new(:name) + module Saveable def save @saved = true end