Sha256: 5915800d8d3ce64546856874af944b6c4dc3578320b744bbbf51dfad5bbb3868
Contents?: true
Size: 1.03 KB
Versions: 8
Compression:
Stored size: 1.03 KB
Contents
require 'test_helper' class ViewsHelperTest < ActionView::TestCase include Errdo::Helpers::ViewsHelper context "methods" do context "user_show_string" do should "default to email" do @user = users(:user) assert_equal @user.email, user_show_string(@user) end should "correctly respond to changing the user_string_method" do @user = users(:user) Errdo.stub :user_string_method, :user_string do assert_equal @user.user_string, user_show_string(@user) end end end context "user_show_path" do should "default to errdo.root_path when nothing set" do @user = users(:user) Errdo.stub :user_show_path, nil do assert_equal errdo.root_path, user_show_path(@user) end end should "correctly respond to changing the user_show_page" do @user = users(:user) Errdo.stub :user_show_path, "user_path" do assert_equal user_path(@user.id), user_show_path(@user) end end end end end
Version data entries
8 entries across 8 versions & 1 rubygems