class PeopleHelperTest
Public Class Methods
name()
click to toggle source
# File actionview/test/template/test_test.rb, line 46 def self.name; "Minitest::Mock"; end
Public Instance Methods
persisted?()
click to toggle source
# File actionview/test/template/test_test.rb, line 45 def persisted?; true; end
test_homepage_path()
click to toggle source
# File actionview/test/template/test_test.rb, line 28 def test_homepage_path with_test_route_set do assert_equal "/people", homepage_path end end
test_homepage_url()
click to toggle source
# File actionview/test/template/test_test.rb, line 34 def test_homepage_url with_test_route_set do assert_equal "http://test.host/people", homepage_url end end
test_link_to_person()
click to toggle source
# File actionview/test/template/test_test.rb, line 40 def test_link_to_person with_test_route_set do person = Struct.new(:name) { extend ActiveModel::Naming def to_model; self; end def persisted?; true; end def self.name; "Minitest::Mock"; end }.new "David" the_model = nil extend Module.new { define_method(:minitest_mock_path) { |model, *args| the_model = model "/people/1" } } assert_equal '<a href="/people/1">David</a>', link_to_person(person) assert_equal person, the_model end end
test_title()
click to toggle source
# File actionview/test/template/test_test.rb, line 24 def test_title assert_equal "<h1>Ruby on Quails</h1>", title("Ruby on Quails") end
to_model()
click to toggle source
# File actionview/test/template/test_test.rb, line 44 def to_model; self; end
Private Instance Methods
with_test_route_set() { || ... }
click to toggle source
# File actionview/test/template/test_test.rb, line 62 def with_test_route_set with_routing do |set| set.draw do get "people", to: "people#index", as: :people end yield end end