Sha256: a9cfcba5dcbdb1087f6ae8e5eff2c89d616a5e7c6d469961eccda9112f395249

Contents?: true

Size: 510 Bytes

Versions: 45

Compression:

Stored size: 510 Bytes

Contents

require 'spec_helper'

describe ChoicesHelper do
  helper ChoicesHelper

  context 'exercise width choices' do
    let(:checked_content) { struct id: '1', index: 0, value: 'foo', text: 'bar' }
    let(:unchecked_content) { struct id: '3', index: 2, value: 'baz', text: 'lorem' }
    let(:content) { '0:1' }
    it { expect(checked? checked_content, content).to be true }
    it { expect(checked? unchecked_content, content).to be false }
    it { expect(checked? unchecked_content, '').to be false }
  end
end

Version data entries

45 entries across 45 versions & 1 rubygems

Version Path
mumuki-laboratory-5.7.0 spec/helpers/with_choices_spec.rb
mumuki-laboratory-5.6.3 spec/helpers/with_choices_spec.rb
mumuki-laboratory-5.6.2 spec/helpers/with_choices_spec.rb
mumuki-laboratory-5.6.1 spec/helpers/with_choices_spec.rb
mumuki-laboratory-5.6.0 spec/helpers/with_choices_spec.rb
mumuki-laboratory-5.5.0 spec/helpers/with_choices_spec.rb
mumuki-laboratory-5.4.0 spec/helpers/with_choices_spec.rb
mumuki-laboratory-5.3.0 spec/helpers/with_choices_spec.rb
mumuki-laboratory-5.2.1 spec/helpers/with_choices_spec.rb
mumuki-laboratory-5.2.0 spec/helpers/with_choices_spec.rb
mumuki-laboratory-5.1.1 spec/helpers/with_choices_spec.rb
mumuki-laboratory-5.1.0 spec/helpers/with_choices_spec.rb
mumuki-laboratory-5.0.12 spec/helpers/with_choices_spec.rb
mumuki-laboratory-5.0.11 spec/helpers/with_choices_spec.rb
mumuki-laboratory-5.0.10 spec/helpers/with_choices_spec.rb
mumuki-laboratory-5.0.9 spec/helpers/with_choices_spec.rb
mumuki-laboratory-5.0.8 spec/helpers/with_choices_spec.rb
mumuki-laboratory-5.0.7 spec/helpers/with_choices_spec.rb
mumuki-laboratory-5.0.6 spec/helpers/with_choices_spec.rb
mumuki-laboratory-5.0.5 spec/helpers/with_choices_spec.rb