Sha256: 4f3006dc49764079889807b99df8f8d66d03fb197705baf5872b60d7e5dcf394

Contents?: true

Size: 602 Bytes

Versions: 36

Compression:

Stored size: 602 Bytes

Contents

module ActionController #:nodoc:
  class TestResponse #:nodoc:
    attr_writer :controller_path

    def capture(name)
      template.instance_variable_get "@content_for_#{name.to_s}"
    end
    
    if ::Rails::VERSION::STRING < "2.3"
      def [](name)
        Kernel.warn <<-WARNING
DEPRECATION NOTICE: [](name) as an alias for capture(name) (TestResponse
extension in rspec-rails) is deprecated and will not be defined by rspec-rails
when working with rails >= 2.3.0. It will also be removed entirely from
a future version of rspec-rails.
WARNING
        capture(name)
      end
    end
  end
end

Version data entries

36 entries across 36 versions & 9 rubygems

Version Path
rspec-rails-1.3.0 lib/spec/rails/extensions/action_controller/test_response.rb
hubbub-0.0.11 lib/vendor/plugins/rspec-rails/lib/spec/rails/extensions/action_controller/test_response.rb
hubbub-0.0.10 lib/vendor/plugins/rspec-rails/lib/spec/rails/extensions/action_controller/test_response.rb
hubbub-0.0.9 lib/vendor/plugins/rspec-rails/lib/spec/rails/extensions/action_controller/test_response.rb
hubbub-0.0.8 lib/vendor/plugins/rspec-rails/lib/spec/rails/extensions/action_controller/test_response.rb
hubbub-0.0.6 lib/vendor/plugins/rspec-rails/lib/spec/rails/extensions/action_controller/test_response.rb
rspec-rails-1.2.9 lib/spec/rails/extensions/action_controller/test_response.rb
rspec-rails-1.2.7 lib/spec/rails/extensions/action_controller/test_response.rb
rspec-rails-1.2.7.1 lib/spec/rails/extensions/action_controller/test_response.rb
rspec-rails-1.2.0 lib/spec/rails/extensions/action_controller/test_response.rb
rspec-rails-1.2.4 lib/spec/rails/extensions/action_controller/test_response.rb
rspec-rails-1.2.2 lib/spec/rails/extensions/action_controller/test_response.rb
rspec-rails-1.2.5 lib/spec/rails/extensions/action_controller/test_response.rb
rspec-rails-1.2.6 lib/spec/rails/extensions/action_controller/test_response.rb
rspec-rails-1.2.1 lib/spec/rails/extensions/action_controller/test_response.rb
rspec-rails-1.2.3 lib/spec/rails/extensions/action_controller/test_response.rb