Sha256: b4310423c0add740e3b9003363d6d1339314d83f84f1a8baa33a7e4392fa028e
Contents?: true
Size: 723 Bytes
Versions: 1
Compression:
Stored size: 723 Bytes
Contents
# _scopes.erb module Scopes include <%= parent_class %>::Scopes <% scope_methods.each do |method| -%> def <%= method.name %><%= "(#{method.arguments.parameters})" unless method.arguments.parameters.to_a.empty? %> ActiveMocker::LoadedMocks.find('<%= class_name %>').send(:call_mock_method, method: '<%= method.name %>', caller: Kernel.caller, arguments: [<%= method.arguments.arguments %>]) end <% end -%> end extend Scopes class ScopeRelation < ActiveMocker::Mock::Association include <%= class_name + mock_append_name %>::Scopes end def self.new_relation(collection) <%= class_name + mock_append_name %>::ScopeRelation.new(collection) end private_class_method :new_relation
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
active_mocker-2.0.0.beta1 | lib/active_mocker/mock_template/_scopes.erb |