Sha256: ecb030c6636072da99f88e2e0b86e5ffc82e4461a36ef486663820bf1a7bd885
Contents?: true
Size: 645 Bytes
Versions: 36
Compression:
Stored size: 645 Bytes
Contents
require File.dirname(__FILE__)+'/../test_helper' class HelpersTest < ActiveSupport::TestCase def setup @controller = PostsController.new @params = stub :[] => "1" @controller.stubs(:params).returns(@params) @object = Post.new Post.stubs(:find).with("1").returns(@object) @collection = mock() Post.stubs(:find).with(:all).returns(@collection) end ResourceController::NAME_ACCESSORS.each do |accessor| context "#{accessor} accessor" do should "default to returning the singular name of the controller" do assert_equal "post", @controller.send(accessor) end end end end
Version data entries
36 entries across 36 versions & 15 rubygems