has_taskbars_examples.rb 366 B

1234567891011
  1. RSpec.shared_examples 'HasTaskbars' do
  2. subject { create(described_class.name.underscore) }
  3. describe '#destroy_taskbars' do
  4. it 'destroys related taskbars' do
  5. taskbar = create(:taskbar, key: "#{described_class.name}-#{subject.id}")
  6. subject.destroy
  7. expect { taskbar.reload }.to raise_exception(ActiveRecord::RecordNotFound)
  8. end
  9. end
  10. end