Sha256: 9fbd4d5720c3834b8a997e767b325c43c0217bcb456b6bdcf1da2513b34ae4cb

Contents?: true

Size: 676 Bytes

Versions: 18

Compression:

Stored size: 676 Bytes

Contents

describe "FormController/OptionsRow" do
  tests Formotion::FormController

  # By default, `tests` uses @controller.init
  # this isn't ideal for our case, so override.
  def controller
    row_settings = {
      title: "Options",
      key: :options,
      type: :options,
      items: ['One', 'Two']
    }
    @form ||= Formotion::Form.new(
      sections: [{
        rows:[row_settings]
    }])

    @controller ||= Formotion::FormController.alloc.initWithForm(@form)
  end

  it "should change row value when selecting segment" do
    tap "One"
    @form.sections[0].rows[0].value.should == "One"
    tap "Two"
    @form.sections[0].rows[0].value.should == "Two"
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
formotion-1.8 spec/functional/options_row_spec.rb
formotion-1.7 spec/functional/options_row_spec.rb
formotion-1.6 spec/functional/options_row_spec.rb
formotion-1.5.1 spec/functional/options_row_spec.rb
formotion-1.5.0 spec/functional/options_row_spec.rb
formotion-1.4.0 spec/functional/options_row_spec.rb
formotion-1.3.1 spec/functional/options_row_spec.rb
formotion-1.3 spec/functional/options_row_spec.rb
formotion-1.2 spec/functional/options_row_spec.rb
formotion-1.1.5 spec/functional/options_row_spec.rb
formotion-1.1.4 spec/functional/options_row_spec.rb
formotion-1.1.3 spec/functional/options_row_spec.rb
formotion-1.1.2 spec/functional/options_row_spec.rb
formotion-1.1.1 spec/functional/options_row_spec.rb
formotion-1.1 spec/functional/options_row_spec.rb
formotion-1.0 spec/functional/options_row_spec.rb
formotion-0.5.1 spec/functional/options_row_spec.rb
formotion-0.5 spec/functional/options_row_spec.rb