lib/cistern/client.rb in cistern-2.6.0 vs lib/cistern/client.rb in cistern-2.7.0

- old
+ new

@@ -42,11 +42,11 @@ interface = options[:interface] || :class interface_callback = (:class == interface) ? :inherited : :included if interface == :class Cistern.deprecation( - %q{class' interface is deprecated. Use `include Cistern::Client.with(interface: :module). See https://github.com/lanej/cistern#custom-architecture}, + %q{'class' interface is deprecated. Use `include Cistern::Client.with(interface: :module). See https://github.com/lanej/cistern#custom-architecture}, caller[2], ) end unless klass.name @@ -83,15 +83,23 @@ end class Real def initialize(options={}) end + + def mocking? + false + end end class Mock def initialize(options={}) end + + def mocking? + true + end end #{interface} #{model_class} def self.#{interface_callback}(klass) cistern.models << klass @@ -181,17 +189,9 @@ klass.extend(::Cistern::Request::ClassMethods) cistern.requests << klass super - end - - def _mock(*args) - mock(*args) - end - - def _real(*args) - real(*args) end end EOS klass.send(:extend, Cistern::Client::ClassMethods)