Sha256: ddb30cab83e7e054dbd352ddc39c58c5d30cab61a7a5ca287d1839eb187e9c0b
Contents?: true
Size: 477 Bytes
Versions: 3
Compression:
Stored size: 477 Bytes
Contents
describe "assignment by model" do before do class Test::Order extend Dry::Initializer::Mixin extend Dry::Initializer::Rails param :user, model: "User" option :product, model: Item end end let!(:user) { User.create name: "Dude" } let!(:item) { Item.create name: "The thing" } it "works" do subject = Test::Order.new(user, product: item) expect(subject.user).to eql user expect(subject.product).to eql item end end
Version data entries
3 entries across 3 versions & 1 rubygems