Permalink
Browse files

Eliminate use of deprecated API's in self-specs

  • Loading branch information...
1 parent cc72e9a commit 7cfecd361ef64c80e73fb41537b842a51d09c637 @dchelimsky dchelimsky committed Sep 19, 2010
@@ -8,7 +8,7 @@
integrate_views if mode == 'integration'
accesses_configured_helper_methods
- include RoutingExampleGroupSpec
+ it_should_behave_like "a routing example"
describe "with an implicit subject" do
it "uses the controller" do
@@ -3,8 +3,7 @@
require File.join(File.dirname(__FILE__), "/shared_routing_example_group_examples.rb")
describe "Routing Examples", :type => :routing do
-
- include RoutingExampleGroupSpec
- include RouteToExampleGroupSpec
- include BeRoutableExampleGroupSpec
+ it_should_behave_like "a routing example"
+ it_should_behave_like "a be routable spec"
+ it_should_behave_like "a route to spec"
end
@@ -1,7 +1,7 @@
class CustomRouteSpecController < ActionController::Base; end
class RspecOnRailsSpecsController < ActionController::Base; end
-share_as :RoutingExampleGroupSpec do
+shared_examples_for "a routing example" do
describe "using backward compatible route_for()" do
it "translates GET-only paths to be explicit" do
self.should_receive(:assert_routing).with(hash_including(:method => :get), anything, {}, anything)
@@ -93,7 +93,7 @@ class RspecOnRailsSpecsController < ActionController::Base; end
end
end
-share_as :BeRoutableExampleGroupSpec do
+shared_examples_for "a be routable spec" do
describe "using should_not be_routable()" do
it "passes for a bad route" do
{ :put => "/rspec_on_rails_specs/bad_route/37" }.
@@ -151,7 +151,7 @@ class RspecOnRailsSpecsController < ActionController::Base; end
end
end
-share_as :RouteToExampleGroupSpec do
+shared_examples_for "a route to spec" do
describe "using should[_not] route_to()" do
it "supports existing routes" do
{ :get => "/controller_spec/some_action" }.

0 comments on commit 7cfecd3

Please sign in to comment.