Sha256: adbc8e4463fd16554db9d3dff483fc30ea861f7dc00eb9d232337b491fdc720f
Contents?: true
Size: 642 Bytes
Versions: 32
Compression:
Stored size: 642 Bytes
Contents
require File.dirname(__FILE__)+'/../test_helper' class HelpersTest < Test::Unit::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
32 entries across 32 versions & 8 rubygems