Sha256: 621c97ffc348bfc22080941d7656ae08dd39dcce943ae42a4fe71b45c84cd2ca

Contents?: true

Size: 747 Bytes

Versions: 2

Compression:

Stored size: 747 Bytes

Contents

describe UnderOs::UI::Textarea do
  before do
    @textarea = UnderOs::UI::Textarea.new
  end

  describe '#initialize' do
    it "should spawn new textareas" do
      @textarea.class.should == UnderOs::UI::Textarea
    end

    it "should wrap the UITextView class" do
      @textarea._.class.should == UITextView
    end

    it "should assign correct tag name" do
      @textarea.tagName.should == 'TEXTAREA'
    end

    it "should accept the 'value' option" do
      textarea = UnderOs::UI::Textarea.new(value: 'boo hoo')
      textarea.value.should == 'boo hoo'
    end

    it "should accept the 'keyboard' option" do
      textarea = UnderOs::UI::Textarea.new(keyboard: 'email')
      textarea.keyboard.should == :email
    end
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
under-os-1.1.0 spec/lib/under_os/ui/textarea_spec.rb
under-os-1.0.0 spec/lib/under_os/ui/textarea_spec.rb