Sha256: 3e3aef4c3fca669de0fd0e54531bcc66b74fdb388de2c526a9080a2da754086e

Contents?: true

Size: 700 Bytes

Versions: 6

Compression:

Stored size: 700 Bytes

Contents

describe "Picker Row" do
  tests_row title: "Picker", key: :picker, type: :picker,
            items: ["Ruby", "Motion"], value: "Motion"

  it "should initialize with correct settings" do
    @row.object.class.should == Formotion::RowType::PickerRow
  end

  it "should build cell with picker as input view of text_field" do
    cell = @row.make_cell

    @row.text_field.inputView.class.should == UIPickerView
  end

  it "should start ui picker at custom value" do
    cell = @row.make_cell

    @row.text_field.inputView.selectedRowInComponent(0).should == 1
  end

  it "should have text field the custom value" do
    cell = @row.make_cell

    @row.text_field.text.should == "Motion"
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
formotion-1.1.4 spec/row_type/picker_spec.rb
formotion-1.1.3 spec/row_type/picker_spec.rb
formotion-1.1.2 spec/row_type/picker_spec.rb
formotion-1.1.1 spec/row_type/picker_spec.rb
formotion-1.1 spec/row_type/picker_spec.rb
formotion-1.0 spec/row_type/picker_spec.rb