Permalink
Browse files

Fix false positives

  • Loading branch information...
1 parent 956508f commit 1b2dedfe20c8bd8e603c9ea1d2da9889ac162c0c @sandro sandro committed Apr 3, 2012
Showing with 3 additions and 9 deletions.
  1. +3 −9 spec/controllers/actioncontroller_base_spec.rb
@@ -15,16 +15,10 @@
end
it "should have the :is_mobile_request? method" do
- # works on ruby 1.9.2, but not on 1.8.7:
- #@controller.private_methods.include?(:is_mobile_request?).should be_true
-
- @controller.send(:is_mobile_request?).should be_nil
+ ActionController::Base.new.respond_to?(:is_mobile_request?, true).should be_true
end
- it "should have the :is_mobile_request? method" do
- # works on ruby 1.9.2, but not on 1.8.7:
- #@controller.private_methods.include?(:is_mobile_request?).should be_true
-
- @controller.send(:is_mobile_view?).should be_nil
+ it "should have the :is_mobile_view? method" do
+ ActionController::Base.new.respond_to?(:is_mobile_view?, true).should be_true
end
end

0 comments on commit 1b2dedf

Please sign in to comment.