summaryrefslogtreecommitdiff
path: root/spec/routing
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2014-07-07 22:41:08 -0600
committermo khan <mo@mokhan.ca>2014-07-07 22:41:27 -0600
commitf42033f2432978e1a2e57abff79d30718b600dca (patch)
tree40005fdea8a9325e819168f5a1390e58f033b130 /spec/routing
parent99cff553c24c9ea7be07a86e99dbf37b501cbbce (diff)
fix broken routing specs.
Diffstat (limited to 'spec/routing')
-rw-r--r--spec/routing/categories_routing_spec.rb3
-rw-r--r--spec/routing/creations_routing_spec.rb2
-rw-r--r--spec/routing/favorites_routing_spec.rb4
-rw-r--r--spec/routing/home_routing_spec.rb5
-rw-r--r--spec/routing/photos_routing_spec.rb13
-rw-r--r--spec/routing/profiles_routing_spec.rb4
-rw-r--r--spec/routing/tutorials_routing_spec.rb16
7 files changed, 16 insertions, 31 deletions
diff --git a/spec/routing/categories_routing_spec.rb b/spec/routing/categories_routing_spec.rb
index 67850eea..8bb147c5 100644
--- a/spec/routing/categories_routing_spec.rb
+++ b/spec/routing/categories_routing_spec.rb
@@ -3,8 +3,7 @@ require "rails_helper"
describe CategoriesController do
describe "routing" do
it "routes to #show" do
- get("/categories/fondant").should route_to({:slug => "fondant", :controller => "categories", :action => "show"})
- get("/categories/fondant/page/1").should route_to({:slug => "fondant", :controller => "categories", :action => "show", :page => "1"})
+ expect(get: "/categories/fondant").to route_to(slug: "fondant", controller: "categories", action: "show")
end
end
end
diff --git a/spec/routing/creations_routing_spec.rb b/spec/routing/creations_routing_spec.rb
index adac466d..592ffd57 100644
--- a/spec/routing/creations_routing_spec.rb
+++ b/spec/routing/creations_routing_spec.rb
@@ -3,7 +3,7 @@ require "rails_helper"
describe CreationsController do
describe "routing" do
it "is the root of the website" do
- get('/').should route_to("creations#index")
+ { get: '/' }.should route_to("creations#index")
end
it "recognizes and generates #index" do
diff --git a/spec/routing/favorites_routing_spec.rb b/spec/routing/favorites_routing_spec.rb
index e8265a5a..dd94d234 100644
--- a/spec/routing/favorites_routing_spec.rb
+++ b/spec/routing/favorites_routing_spec.rb
@@ -4,7 +4,7 @@ describe FavoritesController do
describe "routing" do
it "routes to #index" do
- get("/creations/1/favorites").should route_to({
+ { get: "/creations/1/favorites" }.should route_to({
:controller => "favorites",
:action => "index",
:creation_id => "1"
@@ -12,7 +12,7 @@ describe FavoritesController do
end
it "routes to #create" do
- post("/creations/1/favorites").should route_to({
+ { post: "/creations/1/favorites" }.should route_to({
:controller => "favorites",
:action => "create",
:creation_id => "1"
diff --git a/spec/routing/home_routing_spec.rb b/spec/routing/home_routing_spec.rb
index 588e7c2a..c0ae825d 100644
--- a/spec/routing/home_routing_spec.rb
+++ b/spec/routing/home_routing_spec.rb
@@ -3,10 +3,11 @@ require 'rails_helper'
describe HomeController do
describe "routing" do
it "routes to about us" do
- get('about_us').should route_to("home#about_us")
+ expect(get: 'about_us').to route_to("home#about_us")
end
+
it "routes to why" do
- get('why_cakeside').should route_to("home#why_cakeside")
+ expect(get: 'why_cakeside').to route_to("home#why_cakeside")
end
end
end
diff --git a/spec/routing/photos_routing_spec.rb b/spec/routing/photos_routing_spec.rb
deleted file mode 100644
index 541123ec..00000000
--- a/spec/routing/photos_routing_spec.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-require "rails_helper"
-describe PhotosController do
- describe "routing" do
- it "should route to create" do
- post('creations/1/photos').should
- route_to(:controller => "photos", :action => "create", :creation_id => 1, :method => "POST")
- end
- it "should route to delete" do
- delete('creations/1/photos').should
- route_to(:controller => "photos", :action => "destroy", :creation_id => 1, :method => "DELETE")
- end
- end
-end
diff --git a/spec/routing/profiles_routing_spec.rb b/spec/routing/profiles_routing_spec.rb
index 156bd307..b87b31ef 100644
--- a/spec/routing/profiles_routing_spec.rb
+++ b/spec/routing/profiles_routing_spec.rb
@@ -3,11 +3,11 @@ require 'rails_helper'
describe ProfilesController do
describe "routing" do
it "routes to index" do
- get('/profiles/').should route_to("profiles#index")
+ expect(get: '/profiles/').to route_to("profiles#index")
end
it "routes to #show" do
- get("/profiles/1").should route_to("profiles#show", :id => "1")
+ expect(get: "/profiles/1").to route_to("profiles#show", id: "1")
end
end
end
diff --git a/spec/routing/tutorials_routing_spec.rb b/spec/routing/tutorials_routing_spec.rb
index a4f12990..f7ca96de 100644
--- a/spec/routing/tutorials_routing_spec.rb
+++ b/spec/routing/tutorials_routing_spec.rb
@@ -2,34 +2,32 @@ require "rails_helper"
describe TutorialsController do
describe "routing" do
-
it "routes to #index" do
- get("/tutorials").should route_to("tutorials#index")
+ expect(get: "/tutorials").to route_to("tutorials#index")
end
it "routes to #new" do
- get("/tutorials/new").should route_to("tutorials#new")
+ expect(get: "/tutorials/new").to route_to("tutorials#new")
end
it "routes to #show" do
- get("/tutorials/1").should route_to("tutorials#show", :id => "1")
+ expect(get: "/tutorials/1").to route_to("tutorials#show", :id => "1")
end
it "routes to #edit" do
- get("/tutorials/1/edit").should route_to("tutorials#edit", :id => "1")
+ expect(get: "/tutorials/1/edit").to route_to("tutorials#edit", :id => "1")
end
it "routes to #create" do
- post("/tutorials").should route_to("tutorials#create")
+ expect(post: "/tutorials").to route_to("tutorials#create")
end
it "routes to #update" do
- put("/tutorials/1").should route_to("tutorials#update", :id => "1")
+ expect(put: "/tutorials/1").to route_to("tutorials#update", :id => "1")
end
it "routes to #destroy" do
- delete("/tutorials/1").should route_to("tutorials#destroy", :id => "1")
+ expect(delete: "/tutorials/1").to route_to("tutorials#destroy", :id => "1")
end
-
end
end