Sha256: 7e939cbeb5fabee73926e9cb28663834ab7457891f137493132939cea18a9ac2

Contents?: true

Size: 1018 Bytes

Versions: 33

Compression:

Stored size: 1018 Bytes

Contents

module ActionView #:nodoc:
  class Base #:nodoc:
    include Spec::Rails::Example::RenderObserver
    cattr_accessor :base_view_path
    def render_partial(partial_path, local_assigns = nil, deprecated_local_assigns = nil) #:nodoc:
      if partial_path.is_a?(String)
        unless partial_path.include?("/")
          unless self.class.base_view_path.nil?
            partial_path = "#{self.class.base_view_path}/#{partial_path}"
          end
        end
      end
      super(partial_path, local_assigns, deprecated_local_assigns)
    end

    alias_method :orig_render, :render
    def render(options = {}, old_local_assigns = {}, &block)
      if expect_render_mock_proxy.send(:__mock_proxy).send(:find_matching_expectation, :render, options)
        expect_render_mock_proxy.render(options)
      else
        unless expect_render_mock_proxy.send(:__mock_proxy).send(:find_matching_method_stub, :render, options)
          orig_render(options, old_local_assigns, &block)
        end
      end
    end
  end
end

Version data entries

33 entries across 33 versions & 5 rubygems

Version Path
jcnetdev-rspec-rails-1.1.5 lib/spec/rails/extensions/action_view/base.rb
picolena-0.0.99 app_generators/picolena/templates/vendor/plugins/rspec_on_rails/lib/spec/rails/extensions/action_view/base.rb
picolena-0.1.1 rails_plugins/rspec_on_rails/lib/spec/rails/extensions/action_view/base.rb
picolena-0.1.0 rails_plugins/rspec_on_rails/lib/spec/rails/extensions/action_view/base.rb
picolena-0.1.3 rails_plugins/rspec_on_rails/lib/spec/rails/extensions/action_view/base.rb
picolena-0.1.4 rails_plugins/rspec_on_rails/lib/spec/rails/extensions/action_view/base.rb
picolena-0.1.2 rails_plugins/rspec_on_rails/lib/spec/rails/extensions/action_view/base.rb
picolena-0.1.6 rails_plugins/rspec_on_rails/lib/spec/rails/extensions/action_view/base.rb
picolena-0.1.5 rails_plugins/rspec_on_rails/lib/spec/rails/extensions/action_view/base.rb
picolena-0.1.7 rails_plugins/rspec_on_rails/lib/spec/rails/extensions/action_view/base.rb
picolena-0.1.8 rails_plugins/rspec_on_rails/lib/spec/rails/extensions/action_view/base.rb
radiant-0.6.5.1 vendor/plugins/rspec_on_rails/lib/spec/rails/extensions/action_view/base.rb
radiant-0.6.5 vendor/plugins/rspec_on_rails/lib/spec/rails/extensions/action_view/base.rb
radiant-0.6.6 vendor/plugins/rspec_on_rails/lib/spec/rails/extensions/action_view/base.rb
radiant-0.6.7 vendor/plugins/rspec_on_rails/lib/spec/rails/extensions/action_view/base.rb
radiant-0.6.8 vendor/plugins/rspec_on_rails/lib/spec/rails/extensions/action_view/base.rb
radiant-0.6.9 vendor/plugins/rspec_on_rails/lib/spec/rails/extensions/action_view/base.rb
spree-0.0.9 vendor/plugins/rspec_on_rails/lib/spec/rails/extensions/action_view/base.rb
spree-0.0.8 starter-app/vendor/plugins/rspec_on_rails/lib/spec/rails/extensions/action_view/base.rb
spree-0.2.0 vendor/plugins/rspec_on_rails/lib/spec/rails/extensions/action_view/base.rb