Sha256: 67c74e4de85f81a40653c643b879b68e0c4e31b5d84c8cab7444ae9e238c8670

Contents?: true

Size: 864 Bytes

Versions: 4

Compression:

Stored size: 864 Bytes

Contents

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

  it "inherits fromthe UnderOs::UI::Input" do
    (UnderOs::UI::Textarea < UnderOs::UI::Input).should == true
  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

4 entries across 4 versions & 2 rubygems

Version Path
under-os-ui-1.4.0 spec/under_os/ui/textarea_spec.rb
under-os-1.3.0 spec/lib/under_os/ui/textarea_spec.rb
under-os-1.2.1 spec/lib/under_os/ui/textarea_spec.rb
under-os-1.2.0 spec/lib/under_os/ui/textarea_spec.rb