Sha256: 3d2271e5a2e4f623c0a60ec8578218fdb7574d5e22202194b215258b26222db1
Contents?: true
Size: 745 Bytes
Versions: 10
Compression:
Stored size: 745 Bytes
Contents
require 'spec_helper' describe RailsBestPractices::Core::Routes do let(:routes) { RailsBestPractices::Core::Routes.new } it "should add route" do routes.add_route(["admin", "test"], "posts", "new") routes.map(&:to_s).should == ["Admin::Test::PostsController#new"] end context "route" do it "should add namesapces, controller name and action name" do route = RailsBestPractices::Core::Route.new(['admin', 'test'], 'posts', 'new') route.to_s.should == "Admin::Test::PostsController#new" end it "should add controller name with namespace" do route = RailsBestPractices::Core::Route.new(['admin'], 'test/posts', 'new') route.to_s.should == "Admin::Test::PostsController#new" end end end
Version data entries
10 entries across 10 versions & 1 rubygems