Sha256: 55dde9e31510420320be14f17d11929fc4a5f54302c943f4d67d5150b2fd8e28

Contents?: true

Size: 1.03 KB

Versions: 16

Compression:

Stored size: 1.03 KB

Contents

describe BW::UIViewControllerWrapper do
  describe "#content_frame" do
    describe "given a UIViewController" do
      before do
        @subject = UIViewController.alloc.init
      end

      it "has the correct content frame" do
        height   = App.frame.size.height
        expected = CGRectMake(0, 0, App.frame.size.width, height)

        @subject.content_frame.should.equal(expected)
      end
    end

    ###############################################################################################

    describe "given a UIViewController inside a UINavigationController" do
      before do
        @subject = UIViewController.alloc.init

        UINavigationController.alloc.initWithRootViewController(@subject)
      end

      it "has the correct content frame" do
        height   = App.frame.size.height
        height   -= @subject.navigationController.navigationBar.frame.size.height
        expected = CGRectMake(0, 0, App.frame.size.width, height)

        @subject.content_frame.should.equal(expected)
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
bubble-wrap-1.9.7 spec/motion/ui/ui_view_controller_wrapper_spec.rb
bubble-wrap-1.9.6 spec/motion/ui/ui_view_controller_wrapper_spec.rb
bubble-wrap-1.9.5 spec/motion/ui/ui_view_controller_wrapper_spec.rb
bubble-wrap-1.9.4 spec/motion/ui/ui_view_controller_wrapper_spec.rb
bubble-wrap-1.9.3 spec/motion/ui/ui_view_controller_wrapper_spec.rb
bubble-wrap-1.9.2 spec/motion/ui/ui_view_controller_wrapper_spec.rb
bubble-wrap-1.9.1 spec/motion/ui/ui_view_controller_wrapper_spec.rb
bubble-wrap-1.9.0 spec/motion/ui/ui_view_controller_wrapper_spec.rb
bubble-wrap-1.8.0 spec/motion/ui/ui_view_controller_wrapper_spec.rb
bubble-wrap-1.7.1 spec/motion/ui/ui_view_controller_wrapper_spec.rb
bubble-wrap-1.7.0 spec/motion/ui/ui_view_controller_wrapper_spec.rb
bubble-wrap-1.6.0 spec/motion/ui/ui_view_controller_wrapper_spec.rb
bubble-wrap-1.6.0.rc1 spec/motion/ui/ui_view_controller_wrapper_spec.rb
bubble-wrap-1.5.0 spec/motion/ui/ui_view_controller_wrapper_spec.rb
bubble-wrap-1.5.0.rc1 spec/motion/ui/ui_view_controller_wrapper_spec.rb
bubble-wrap-1.4.0 spec/motion/ui/ui_view_controller_wrapper_spec.rb