debian-mirror-gitlab/spec/models/concerns/from_set_operator_spec.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

21 lines
461 B
Ruby
Raw Normal View History

2020-11-24 15:15:51 +05:30
# frozen_string_literal: true
require 'spec_helper'
RSpec.describe FromSetOperator do
describe 'when set operator method already exists' do
let(:redefine_method) do
Class.new do
def self.from_union
# This method intentionally left blank.
end
extend FromSetOperator
define_set_operator Gitlab::SQL::Union
end
end
it { expect { redefine_method }.to raise_exception(RuntimeError) }
end
end