Sha256: 9b7ec87e9dec81beaa22ea2696a80e12e59da6a33389ecd513c81ad1ea7e1d0a
Contents?: true
Size: 926 Bytes
Versions: 1
Compression:
Stored size: 926 Bytes
Contents
class MockModel attr_accessor :attributes, :called_save, :called_destroy extend TmsBridge::ModelSupport NOT_FOUND=false FOUND=true def self.column_names ['updated_at', 'created_at', 'id', 'some_key'] end def self.attribute_aliases return {} end def save(*args) self.called_save = true end def destroy self.called_destroy = true end def self.find_by_tms_id(tms_id) return tms_id == FOUND ? FoundMockPublishing.new : nil end end class MockPublishing<MockModel end class FoundMockPublishing<MockModel end class MockController cattr_accessor :before_filters attr_accessor :json attr_reader :request def self.before_filter(filter) @@before_filters ||= [] @@before_filters << filter end def initialize @request = MockRequest.new end def head(*args);end def render(*args);end end class MockRequest attr_accessor :raw_post end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
tms_bridge-0.2.0 | spec/tms_bridge/mocks.rb |