Sha256: afb8f21ff510f337fd7957de49426ac8384c6762da08753d7374fa8b1a191c6e

Contents?: true

Size: 509 Bytes

Versions: 127

Compression:

Stored size: 509 Bytes

Contents

require 'spec_helper'

describe ChoicesHelper do
  helper ChoicesHelper

  context 'exercise with 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

127 entries across 127 versions & 1 rubygems

Version Path
mumuki-laboratory-9.23.0 spec/helpers/with_choices_spec.rb
mumuki-laboratory-9.22.0 spec/helpers/with_choices_spec.rb
mumuki-laboratory-9.21.0 spec/helpers/with_choices_spec.rb
mumuki-laboratory-9.20.1 spec/helpers/with_choices_spec.rb
mumuki-laboratory-9.20.0 spec/helpers/with_choices_spec.rb
mumuki-laboratory-9.19.0 spec/helpers/with_choices_spec.rb
mumuki-laboratory-9.18.1 spec/helpers/with_choices_spec.rb
mumuki-laboratory-9.18.0 spec/helpers/with_choices_spec.rb
mumuki-laboratory-9.17.0 spec/helpers/with_choices_spec.rb
mumuki-laboratory-9.16.0 spec/helpers/with_choices_spec.rb
mumuki-laboratory-9.15.0 spec/helpers/with_choices_spec.rb
mumuki-laboratory-9.14.1 spec/helpers/with_choices_spec.rb
mumuki-laboratory-9.14.0 spec/helpers/with_choices_spec.rb
mumuki-laboratory-9.13.2 spec/helpers/with_choices_spec.rb
mumuki-laboratory-9.13.1 spec/helpers/with_choices_spec.rb
mumuki-laboratory-9.13.0 spec/helpers/with_choices_spec.rb
mumuki-laboratory-9.12.1 spec/helpers/with_choices_spec.rb
mumuki-laboratory-9.12.0 spec/helpers/with_choices_spec.rb
mumuki-laboratory-9.11.0 spec/helpers/with_choices_spec.rb
mumuki-laboratory-9.10.0 spec/helpers/with_choices_spec.rb