Skip to content
Browse files

Properly deprecate integrate_views

  • Loading branch information...
1 parent bb43457 commit 49c87d5f0a1186a87e22d8b23d9bbb6e407546fd @dchelimsky dchelimsky committed Oct 24, 2010
Showing with 23 additions and 0 deletions.
  1. +5 −0 lib/rspec/rails/view_rendering.rb
  2. +18 −0 spec/rspec/rails/deprecations_spec.rb
View
5 lib/rspec/rails/view_rendering.rb
@@ -15,6 +15,11 @@ def render_views
metadata_for_rspec_rails[:render_views] = true
end
+ def integrate_views
+ RSpec.deprecate("integrate_views","render_views")
+ render_views
+ end
+
def render_views?
!!metadata_for_rspec_rails[:render_views]
end
View
18 spec/rspec/rails/deprecations_spec.rb
@@ -0,0 +1,18 @@
+require 'spec_helper'
+
+describe "rspec-rails-2 deprecations" do
+ context "controller specs" do
+ describe "::integrate_views" do
+ let(:group) do
+ RSpec::Core::ExampleGroup.describe do
+ include RSpec::Rails::ControllerExampleGroup
+ end
+ end
+
+ it "is deprecated" do
+ RSpec.should_receive(:deprecate)
+ group.integrate_views
+ end
+ end
+ end
+end

0 comments on commit 49c87d5

Please sign in to comment.
Something went wrong with that request. Please try again.