OSDN Git Service

556b0593eaef6a5f5f4cacba8a1441d449ac2c0e
[redminele/redminele.git] / ruby / lib / ruby / gems / 1.8 / gems / actionpack-2.3.11 / test / controller / addresses_render_test.rb
1 require 'abstract_unit'
2
3 class Address
4   def Address.count(conditions = nil, join = nil)
5     nil
6   end
7
8   def Address.find_all(arg1, arg2, arg3, arg4)
9     []
10   end
11
12   def self.find(*args)
13     []
14   end
15 end
16
17 class AddressesTestController < ActionController::Base
18   def self.controller_name; "addresses"; end
19   def self.controller_path; "addresses"; end
20 end
21
22 class AddressesTest < ActionController::TestCase
23   tests AddressesTestController
24
25   def setup
26     # enable a logger so that (e.g.) the benchmarking stuff runs, so we can get
27     # a more accurate simulation of what happens in "real life".
28     @controller.logger = Logger.new(nil)
29
30     @request.host = "www.nextangle.com"
31   end
32
33   def test_list
34     get :list
35     assert_equal "We only need to get this far!", @response.body.chomp
36   end
37 end