Sha256: a322fa686a36d68f72df393ff44a2554a1d328e61c1b1bd91e68cb03f09c01f5
Contents?: true
Size: 863 Bytes
Versions: 5
Compression:
Stored size: 863 Bytes
Contents
require "spec_helper" describe "Adapter" do include_context "users and tasks" do before(:all) do Class.new(ROM::Adapter::Memory) do def self.schemes [:memory] end def extend_relation_class(klass) klass.class_eval do def self.freaking_awesome? true end end end def extend_relation_instance(relation) relation.instance_eval do def freaking_cool? true end end end ROM::Adapter.register(self) end end end before do setup.relation(:users) end it "can extend relation class" do expect(rom.relations.users.class).to be_freaking_awesome end it "can extend relation instance" do expect(rom.relations.users).to be_freaking_cool end end
Version data entries
5 entries across 5 versions & 1 rubygems