Sha256: 16dffe4f50619cf337c03425deb7f0b5df662b26682b80c2274eac53d80c51c8
Contents?: true
Size: 527 Bytes
Versions: 15
Compression:
Stored size: 527 Bytes
Contents
require 'spec_helper' describe Datagrid::Drivers::ActiveRecord do describe ".match?" do subject { described_class } it {should be_match(Entry)} it {should be_match(Entry.scoped)} it {should_not be_match(MongoidEntry)} end it "should convert any scope to AR::Relation" do subject.to_scope(Entry).should be_a(ActiveRecord::Relation) subject.to_scope(Entry.limit(5)).should be_a(ActiveRecord::Relation) subject.to_scope(Group.create!.entries).should be_a(ActiveRecord::Relation) end end
Version data entries
15 entries across 15 versions & 1 rubygems