Sha256: 4aca7c9852d5b4e72137cb897fa497a3172da239dbadcd4cf187f0387a0cb48c

Contents?: true

Size: 432 Bytes

Versions: 2

Compression:

Stored size: 432 Bytes

Contents

RSpec.shared_examples 'labeled active element' do
  it 'has a label' do
    render render_params
    expect(rendered).to include '<label for="group_field_name">Field name</label>'
  end

  context 'when it is required' do
    before(:each) { attributes[:required] = true }

    it "has an asterisk" do
      render render_params
      expect(rendered).to include '<label for="group_field_name">Field name*</label>'
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
hungryform-rails-0.0.6 spec/views/shared_examples/labeled_active_element.rb
hungryform-rails-0.0.5 spec/views/shared_examples/labeled_active_element.rb