Sha256: 4249cda1069996c5504a06061853fe0a211b911fd10d09e8245fc07acbb63feb

Contents?: true

Size: 914 Bytes

Versions: 5

Compression:

Stored size: 914 Bytes

Contents

describe UnderOs::UI::Scroll do
  before do
    @scroll = UnderOs::UI::Scroll.new
  end

  describe '#initialize' do
    it 'should build an UI:Scroll object' do
      @scroll.class.should == UnderOs::UI::Scroll
    end

    it "should wrap an UIScrollView instance" do
      @scroll._.class.should == UIScrollView
    end

    it "should have the SCROLL tag" do
      @scroll.tagName.should == 'SCROLL'
    end

    it "should accept the 'paging' option" do
      scroll = UnderOs::UI::Scroll.new(paging: true)
      scroll.paging.should == true
    end
  end

  describe '#paging' do
    it "should return 'false' by default" do
      @scroll.paging.should == false
    end

    it "should to switch it on" do
      @scroll.paging = true
      @scroll.paging.should == true
    end

    it "should fallback to false" do
      @scroll.paging = 'weird stuff'
      @scroll.paging.should == false
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
under-os-1.3.0 spec/lib/under_os/ui/scroll_spec.rb
under-os-1.2.1 spec/lib/under_os/ui/scroll_spec.rb
under-os-1.2.0 spec/lib/under_os/ui/scroll_spec.rb
under-os-1.1.0 spec/lib/under_os/ui/scroll_spec.rb
under-os-1.0.0 spec/lib/under_os/ui/scroll_spec.rb