Sha256: 6b36401f362f9968ba8d60290df6944933e86c0d3bceab4b3c604ff9204a9d18
Contents?: true
Size: 669 Bytes
Versions: 132
Compression:
Stored size: 669 Bytes
Contents
class MockDataset < Sequel::Dataset def insert(*args); end def insert_select(*args); end def update(*args); end def fetch_rows(sql); end def quoted_identifier(c); end end class MockDatabase < Sequel::Database def execute(sql, opts={}); end def reset; end def transaction(opts={}); end def dataset; MockDataset.new(self); end end MOCK_DB = MockDatabase.new unless defined?(MOCK_DB) class MockModel < Sequel::Model(MOCK_DB) def initialize(values) @values = values end def respond_to?(m) @values.has_key?(m) end def method_missing(m, *args, &block) return @values[m] if @values.has_key?(m) super(m, *args, &block) end end
Version data entries
132 entries across 132 versions & 1 rubygems