Sha256: 02b375a7c3fb5800928ec21190b6620351be5ef8cfe8bca10a74e0a4de17758a
Contents?: true
Size: 653 Bytes
Versions: 1
Compression:
Stored size: 653 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) @_rc_object = Post.new Post.stubs(:find).with("1").returns(@_rc_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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
resource_controller_views-0.6.6.views2 | test/test/unit/helpers_test.rb |