Commit 366a3f9e authored by Sean McGivern's avatar Sean McGivern

Merge branch 'cablett-it-specify' into 'master'

Change some `it do` to `specify do`

See merge request gitlab-org/gitlab!31199
parents 162c6641 576484d7
...@@ -24,7 +24,7 @@ describe Admin::CredentialsController do ...@@ -24,7 +24,7 @@ describe Admin::CredentialsController do
let_it_be(:personal_access_tokens) { create_list(:personal_access_token, 2) } let_it_be(:personal_access_tokens) { create_list(:personal_access_token, 2) }
shared_examples_for 'filtering by `personal_access_tokens`' do shared_examples_for 'filtering by `personal_access_tokens`' do
it do specify do
get :index, params: params get :index, params: params
expect(assigns(:credentials)).to match_array(personal_access_tokens) expect(assigns(:credentials)).to match_array(personal_access_tokens)
......
...@@ -37,7 +37,7 @@ describe Profiles::PreferencesController do ...@@ -37,7 +37,7 @@ describe Profiles::PreferencesController do
context 'when security dashboard feature is disabled' do context 'when security dashboard feature is disabled' do
context 'when security dashboard feature enabled' do context 'when security dashboard feature enabled' do
it do specify do
expect { subject }.not_to change { user.reload.group_view_security_dashboard? } expect { subject }.not_to change { user.reload.group_view_security_dashboard? }
end end
end end
......
...@@ -9,7 +9,7 @@ describe Groups::RoadmapController do ...@@ -9,7 +9,7 @@ describe Groups::RoadmapController do
describe '#show' do describe '#show' do
context 'when the user is signed in' do context 'when the user is signed in' do
shared_examples_for 'returns 404 status' do shared_examples_for 'returns 404 status' do
it do specify do
get :show, params: { group_id: group } get :show, params: { group_id: group }
expect(response).to have_gitlab_http_status(:not_found) expect(response).to have_gitlab_http_status(:not_found)
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
require 'spec_helper' require 'spec_helper'
describe Types::PermissionTypes::Epic do describe Types::PermissionTypes::Epic do
it do specify do
expected_permissions = [:read_epic, :read_epic_iid, :update_epic, :destroy_epic, expected_permissions = [:read_epic, :read_epic_iid, :update_epic, :destroy_epic,
:admin_epic, :create_epic, :create_note, :award_emoji] :admin_epic, :create_epic, :create_note, :award_emoji]
......
...@@ -49,7 +49,7 @@ describe Gitlab::ApplicationContext do ...@@ -49,7 +49,7 @@ describe Gitlab::ApplicationContext do
end end
with_them do with_them do
it do specify do
# Build a hash that has all `provided_options` as keys, and `nil` as value # Build a hash that has all `provided_options` as keys, and `nil` as value
provided_values = provided_options.map { |key| [key, nil] }.to_h provided_values = provided_options.map { |key| [key, nil] }.to_h
context = described_class.new(provided_values) context = described_class.new(provided_values)
......
...@@ -31,7 +31,7 @@ describe Gitlab::CIDR do ...@@ -31,7 +31,7 @@ describe Gitlab::CIDR do
end end
with_them do with_them do
it do specify do
expect(described_class.new(values).match?(ip)).to eq(match) expect(described_class.new(values).match?(ip)).to eq(match)
end end
end end
......
...@@ -300,7 +300,7 @@ describe Gitlab::Geo, :geo, :request_store do ...@@ -300,7 +300,7 @@ describe Gitlab::Geo, :geo, :request_store do
end end
with_them do with_them do
it do specify do
stub_application_setting(geo_node_allowed_ips: allowed_ips) stub_application_setting(geo_node_allowed_ips: allowed_ips)
expect(described_class.allowed_ip?(ip)).to eq(allowed) expect(described_class.allowed_ip?(ip)).to eq(allowed)
......
...@@ -95,7 +95,7 @@ describe ApplicationSetting do ...@@ -95,7 +95,7 @@ describe ApplicationSetting do
end end
with_them do with_them do
it do specify do
setting.update_column(:geo_node_allowed_ips, allowed_ips) setting.update_column(:geo_node_allowed_ips, allowed_ips)
expect(setting.reload.valid?).to eq(is_valid) expect(setting.reload.valid?).to eq(is_valid)
...@@ -122,7 +122,7 @@ describe ApplicationSetting do ...@@ -122,7 +122,7 @@ describe ApplicationSetting do
end end
with_them do with_them do
it do specify do
setting.elasticsearch_url = elasticsearch_url setting.elasticsearch_url = elasticsearch_url
expect(setting.valid?).to eq(is_valid) expect(setting.valid?).to eq(is_valid)
......
...@@ -862,7 +862,7 @@ describe Project do ...@@ -862,7 +862,7 @@ describe Project do
with_them do with_them do
let(:project) { build(:project, :mirror, import_url: import_url, import_data_attributes: { auth_method: auth_method } ) } let(:project) { build(:project, :mirror, import_url: import_url, import_data_attributes: { auth_method: auth_method } ) }
it do specify do
expect(project.repository).to receive(:fetch_upstream).with(expected, forced: false) expect(project.repository).to receive(:fetch_upstream).with(expected, forced: false)
project.fetch_mirror project.fetch_mirror
......
...@@ -105,9 +105,7 @@ describe GroupPolicy do ...@@ -105,9 +105,7 @@ describe GroupPolicy do
subject { described_class.new(non_group_member, private_group) } subject { described_class.new(non_group_member, private_group) }
context 'when user is not invited to any of the group projects' do context 'when user is not invited to any of the group projects' do
it do it { is_expected.not_to be_allowed(:read_group_contribution_analytics) }
is_expected.not_to be_allowed(:read_group_contribution_analytics)
end
end end
context 'when user is invited to a group project, but not to the group' do context 'when user is invited to a group project, but not to the group' do
...@@ -117,9 +115,7 @@ describe GroupPolicy do ...@@ -117,9 +115,7 @@ describe GroupPolicy do
private_project.add_guest(non_group_member) private_project.add_guest(non_group_member)
end end
it do it { is_expected.not_to be_allowed(:read_group_contribution_analytics) }
is_expected.not_to be_allowed(:read_group_contribution_analytics)
end
end end
end end
end end
...@@ -674,7 +670,7 @@ describe GroupPolicy do ...@@ -674,7 +670,7 @@ describe GroupPolicy do
stub_licensed_features(security_dashboard: true) stub_licensed_features(security_dashboard: true)
end end
it do specify do
expect_allowed(:read_group) expect_allowed(:read_group)
expect_allowed(:read_group_security_dashboard) expect_allowed(:read_group_security_dashboard)
expect_disallowed(:upload_file) expect_disallowed(:upload_file)
......
...@@ -211,25 +211,19 @@ describe ProjectPolicy do ...@@ -211,25 +211,19 @@ describe ProjectPolicy do
context 'with admin' do context 'with admin' do
let(:current_user) { admin } let(:current_user) { admin }
it do it { is_expected.to be_allowed(:admin_mirror) }
is_expected.to be_allowed(:admin_mirror)
end
end end
context 'with owner' do context 'with owner' do
let(:current_user) { owner } let(:current_user) { owner }
it do it { is_expected.to be_allowed(:admin_mirror) }
is_expected.to be_allowed(:admin_mirror)
end
end end
context 'with developer' do context 'with developer' do
let(:current_user) { developer } let(:current_user) { developer }
it do it { is_expected.to be_disallowed(:admin_mirror) }
is_expected.to be_disallowed(:admin_mirror)
end
end end
end end
...@@ -241,17 +235,13 @@ describe ProjectPolicy do ...@@ -241,17 +235,13 @@ describe ProjectPolicy do
context 'with admin' do context 'with admin' do
let(:current_user) { admin } let(:current_user) { admin }
it do it { is_expected.to be_allowed(:admin_mirror) }
is_expected.to be_allowed(:admin_mirror)
end
end end
context 'with owner' do context 'with owner' do
let(:current_user) { owner } let(:current_user) { owner }
it do it { is_expected.to be_disallowed(:admin_mirror) }
is_expected.to be_disallowed(:admin_mirror)
end
end end
end end
...@@ -263,17 +253,13 @@ describe ProjectPolicy do ...@@ -263,17 +253,13 @@ describe ProjectPolicy do
context 'with admin' do context 'with admin' do
let(:current_user) { admin } let(:current_user) { admin }
it do it { is_expected.to be_disallowed(:admin_mirror) }
is_expected.to be_disallowed(:admin_mirror)
end
end end
context 'with owner' do context 'with owner' do
let(:current_user) { owner } let(:current_user) { owner }
it do it { is_expected.to be_disallowed(:admin_mirror) }
is_expected.to be_disallowed(:admin_mirror)
end
end end
end end
...@@ -285,17 +271,13 @@ describe ProjectPolicy do ...@@ -285,17 +271,13 @@ describe ProjectPolicy do
context 'with admin' do context 'with admin' do
let(:current_user) { admin } let(:current_user) { admin }
it do it { is_expected.to be_allowed(:admin_mirror) }
is_expected.to be_allowed(:admin_mirror)
end
end end
context 'with owner' do context 'with owner' do
let(:current_user) { owner } let(:current_user) { owner }
it do it { is_expected.to be_allowed(:admin_mirror) }
is_expected.to be_allowed(:admin_mirror)
end
end end
end end
end end
...@@ -973,9 +955,7 @@ describe ProjectPolicy do ...@@ -973,9 +955,7 @@ describe ProjectPolicy do
stub_licensed_features(feature => true) stub_licensed_features(feature => true)
end end
it do it { is_expected.to(allowed ? be_allowed(policy) : be_disallowed(policy)) }
is_expected.to(allowed ? be_allowed(policy) : be_disallowed(policy))
end
context 'when feature is not available' do context 'when feature is not available' do
before do before do
...@@ -1173,9 +1153,7 @@ describe ProjectPolicy do ...@@ -1173,9 +1153,7 @@ describe ProjectPolicy do
stub_licensed_features(code_review_analytics: true) stub_licensed_features(code_review_analytics: true)
end end
it do it { is_expected.to(allowed ? be_allowed(:read_code_review_analytics) : be_disallowed(:read_code_review_analytics)) }
is_expected.to(allowed ? be_allowed(:read_code_review_analytics) : be_disallowed(:read_code_review_analytics))
end
end end
context 'with code review analytics is not available in license' do context 'with code review analytics is not available in license' do
...@@ -1256,9 +1234,7 @@ describe ProjectPolicy do ...@@ -1256,9 +1234,7 @@ describe ProjectPolicy do
stub_application_setting(setting_name => setting) stub_application_setting(setting_name => setting)
end end
it do it { is_expected.to(allowed ? be_allowed(policy) : be_disallowed(policy)) }
is_expected.to(allowed ? be_allowed(policy) : be_disallowed(policy))
end
end end
end end
...@@ -1283,9 +1259,7 @@ describe ProjectPolicy do ...@@ -1283,9 +1259,7 @@ describe ProjectPolicy do
stub_application_setting(setting_name => setting) stub_application_setting(setting_name => setting)
end end
it do it { is_expected.to(allowed ? be_allowed(policy) : be_disallowed(policy)) }
is_expected.to(allowed ? be_allowed(policy) : be_disallowed(policy))
end
end end
end end
end end
...@@ -1338,9 +1312,7 @@ describe ProjectPolicy do ...@@ -1338,9 +1312,7 @@ describe ProjectPolicy do
stub_application_setting(setting_name => setting) stub_application_setting(setting_name => setting)
end end
it do it { is_expected.to(allowed ? be_allowed(policy) : be_disallowed(policy)) }
is_expected.to(allowed ? be_allowed(policy) : be_disallowed(policy))
end
end end
end end
...@@ -1365,9 +1337,7 @@ describe ProjectPolicy do ...@@ -1365,9 +1337,7 @@ describe ProjectPolicy do
stub_application_setting(setting_name => setting) stub_application_setting(setting_name => setting)
end end
it do it { is_expected.to(allowed ? be_allowed(policy) : be_disallowed(policy)) }
is_expected.to(allowed ? be_allowed(policy) : be_disallowed(policy))
end
end end
end end
end end
...@@ -1403,9 +1373,7 @@ describe ProjectPolicy do ...@@ -1403,9 +1373,7 @@ describe ProjectPolicy do
stub_licensed_features(compliance_framework: feature_enabled) stub_licensed_features(compliance_framework: feature_enabled)
end end
it do it { is_expected.to(allowed ? be_allowed(policy) : be_disallowed(policy)) }
is_expected.to(allowed ? be_allowed(policy) : be_disallowed(policy))
end
end end
end end
end end
...@@ -646,7 +646,7 @@ describe API::Groups do ...@@ -646,7 +646,7 @@ describe API::Groups do
subject { delete api("/groups/#{group.id}", user) } subject { delete api("/groups/#{group.id}", user) }
shared_examples_for 'immediately enqueues the job to delete the group' do shared_examples_for 'immediately enqueues the job to delete the group' do
it do specify do
Sidekiq::Testing.fake! do Sidekiq::Testing.fake! do
expect { subject }.to change(GroupDestroyWorker.jobs, :size).by(1) expect { subject }.to change(GroupDestroyWorker.jobs, :size).by(1)
end end
......
...@@ -37,7 +37,7 @@ describe API::Todos do ...@@ -37,7 +37,7 @@ describe API::Todos do
end end
shared_examples 'an endpoint that responds with success' do shared_examples 'an endpoint that responds with success' do
it do specify do
expect(response).to have_gitlab_http_status(:ok) expect(response).to have_gitlab_http_status(:ok)
end end
end end
......
...@@ -7,7 +7,7 @@ describe 'Git HTTP requests' do ...@@ -7,7 +7,7 @@ describe 'Git HTTP requests' do
include WorkhorseHelpers include WorkhorseHelpers
shared_examples_for 'pulls are allowed' do shared_examples_for 'pulls are allowed' do
it do specify do
download(path, env) do |response| download(path, env) do |response|
expect(response).to have_gitlab_http_status(:ok) expect(response).to have_gitlab_http_status(:ok)
expect(response.media_type).to eq(Gitlab::Workhorse::INTERNAL_API_CONTENT_TYPE) expect(response.media_type).to eq(Gitlab::Workhorse::INTERNAL_API_CONTENT_TYPE)
...@@ -16,7 +16,7 @@ describe 'Git HTTP requests' do ...@@ -16,7 +16,7 @@ describe 'Git HTTP requests' do
end end
shared_examples_for 'pushes are allowed' do shared_examples_for 'pushes are allowed' do
it do specify do
upload(path, env) do |response| upload(path, env) do |response|
expect(response).to have_gitlab_http_status(:ok) expect(response).to have_gitlab_http_status(:ok)
expect(response.media_type).to eq(Gitlab::Workhorse::INTERNAL_API_CONTENT_TYPE) expect(response.media_type).to eq(Gitlab::Workhorse::INTERNAL_API_CONTENT_TYPE)
......
...@@ -157,7 +157,7 @@ describe Git::BranchPushService do ...@@ -157,7 +157,7 @@ describe Git::BranchPushService do
let(:commits_to_sync) { [] } let(:commits_to_sync) { [] }
shared_examples 'enqueues Jira sync worker' do shared_examples 'enqueues Jira sync worker' do
it do specify do
Sidekiq::Testing.fake! do Sidekiq::Testing.fake! do
expect(JiraConnect::SyncBranchWorker).to receive(:perform_async) expect(JiraConnect::SyncBranchWorker).to receive(:perform_async)
.with(project.id, branch_to_sync, commits_to_sync) .with(project.id, branch_to_sync, commits_to_sync)
...@@ -169,7 +169,7 @@ describe Git::BranchPushService do ...@@ -169,7 +169,7 @@ describe Git::BranchPushService do
end end
shared_examples 'does not enqueue Jira sync worker' do shared_examples 'does not enqueue Jira sync worker' do
it do specify do
Sidekiq::Testing.fake! do Sidekiq::Testing.fake! do
expect { subject.execute }.not_to change(JiraConnect::SyncBranchWorker.jobs, :size) expect { subject.execute }.not_to change(JiraConnect::SyncBranchWorker.jobs, :size)
end end
......
...@@ -14,7 +14,7 @@ describe Members::DestroyService do ...@@ -14,7 +14,7 @@ describe Members::DestroyService do
end end
shared_examples_for 'logs an audit event' do shared_examples_for 'logs an audit event' do
it do specify do
expect { event }.to change { SecurityEvent.count }.by(1) expect { event }.to change { SecurityEvent.count }.by(1)
end end
end end
......
...@@ -19,7 +19,7 @@ describe Members::UpdateService do ...@@ -19,7 +19,7 @@ describe Members::UpdateService do
end end
shared_examples_for 'logs an audit event' do shared_examples_for 'logs an audit event' do
it do specify do
expect do expect do
described_class.new(current_user, params).execute(member, permission: permission) described_class.new(current_user, params).execute(member, permission: permission)
end.to change { SecurityEvent.count }.by(1) end.to change { SecurityEvent.count }.by(1)
......
...@@ -415,7 +415,7 @@ describe EE::NotificationService, :mailer do ...@@ -415,7 +415,7 @@ describe EE::NotificationService, :mailer do
end end
describe '#new_note' do describe '#new_note' do
it do specify do
reset_delivered_emails! reset_delivered_emails!
expect(SentNotification).to receive(:record).with(epic, any_args).exactly(9).times expect(SentNotification).to receive(:record).with(epic, any_args).exactly(9).times
......
...@@ -28,7 +28,7 @@ describe MergeTrains::CreatePipelineService do ...@@ -28,7 +28,7 @@ describe MergeTrains::CreatePipelineService do
shared_examples_for 'returns an error' do shared_examples_for 'returns an error' do
let(:expected_reason) { 'unknown' } let(:expected_reason) { 'unknown' }
it do specify do
expect(subject[:status]).to eq(:error) expect(subject[:status]).to eq(:error)
expect(subject[:message]).to eq(expected_reason) expect(subject[:message]).to eq(expected_reason)
end end
......
...@@ -27,7 +27,7 @@ describe MergeTrains::RefreshMergeRequestService do ...@@ -27,7 +27,7 @@ describe MergeTrains::RefreshMergeRequestService do
shared_examples_for 'drops the merge request from the merge train' do shared_examples_for 'drops the merge request from the merge train' do
let(:expected_reason) { 'unknown' } let(:expected_reason) { 'unknown' }
it do specify do
expect_next_instance_of(AutoMerge::MergeTrainService) do |service| expect_next_instance_of(AutoMerge::MergeTrainService) do |service|
expect(service).to receive(:abort).with(merge_request, expected_reason, hash_including(process_next: false)) expect(service).to receive(:abort).with(merge_request, expected_reason, hash_including(process_next: false))
end end
...@@ -39,7 +39,7 @@ describe MergeTrains::RefreshMergeRequestService do ...@@ -39,7 +39,7 @@ describe MergeTrains::RefreshMergeRequestService do
shared_examples_for 'creates a pipeline for merge train' do shared_examples_for 'creates a pipeline for merge train' do
let(:previous_ref) { 'refs/heads/master' } let(:previous_ref) { 'refs/heads/master' }
it do specify do
expect_next_instance_of(MergeTrains::CreatePipelineService, project, maintainer) do |pipeline_service| expect_next_instance_of(MergeTrains::CreatePipelineService, project, maintainer) do |pipeline_service|
allow(pipeline_service).to receive(:execute) { { status: :success, pipeline: pipeline } } allow(pipeline_service).to receive(:execute) { { status: :success, pipeline: pipeline } }
expect(pipeline_service).to receive(:execute).with(merge_request, previous_ref) expect(pipeline_service).to receive(:execute).with(merge_request, previous_ref)
...@@ -73,7 +73,7 @@ describe MergeTrains::RefreshMergeRequestService do ...@@ -73,7 +73,7 @@ describe MergeTrains::RefreshMergeRequestService do
end end
shared_examples_for 'does not create a pipeline' do shared_examples_for 'does not create a pipeline' do
it do specify do
expect(service).not_to receive(:create_pipeline!) expect(service).not_to receive(:create_pipeline!)
result = subject result = subject
......
...@@ -29,7 +29,7 @@ end ...@@ -29,7 +29,7 @@ end
RSpec.shared_examples 'responds with "not found" for an unknown vulnerability ID' do RSpec.shared_examples 'responds with "not found" for an unknown vulnerability ID' do
let(:vulnerability_id) { 0 } let(:vulnerability_id) { 0 }
it do specify do
subject subject
expect(response).to have_gitlab_http_status(:not_found) expect(response).to have_gitlab_http_status(:not_found)
......
...@@ -24,7 +24,7 @@ describe Projects::ServiceHookLogsController do ...@@ -24,7 +24,7 @@ describe Projects::ServiceHookLogsController do
describe 'GET #show' do describe 'GET #show' do
subject { get :show, params: log_params } subject { get :show, params: log_params }
it do specify do
expect(response).to be_successful expect(response).to be_successful
end end
end end
......
...@@ -23,7 +23,7 @@ describe 'Adding an AwardEmoji' do ...@@ -23,7 +23,7 @@ describe 'Adding an AwardEmoji' do
end end
shared_examples 'a mutation that does not create an AwardEmoji' do shared_examples 'a mutation that does not create an AwardEmoji' do
it do specify do
expect do expect do
post_graphql_mutation(mutation, current_user: current_user) post_graphql_mutation(mutation, current_user: current_user)
end.not_to change { AwardEmoji.count } end.not_to change { AwardEmoji.count }
......
...@@ -24,7 +24,7 @@ describe 'Removing an AwardEmoji' do ...@@ -24,7 +24,7 @@ describe 'Removing an AwardEmoji' do
end end
shared_examples 'a mutation that does not destroy an AwardEmoji' do shared_examples 'a mutation that does not destroy an AwardEmoji' do
it do specify do
expect do expect do
post_graphql_mutation(mutation, current_user: current_user) post_graphql_mutation(mutation, current_user: current_user)
end.not_to change { AwardEmoji.count } end.not_to change { AwardEmoji.count }
......
...@@ -23,7 +23,7 @@ describe 'Toggling an AwardEmoji' do ...@@ -23,7 +23,7 @@ describe 'Toggling an AwardEmoji' do
end end
shared_examples 'a mutation that does not create or destroy an AwardEmoji' do shared_examples 'a mutation that does not create or destroy an AwardEmoji' do
it do specify do
expect do expect do
post_graphql_mutation(mutation, current_user: current_user) post_graphql_mutation(mutation, current_user: current_user)
end.not_to change { AwardEmoji.count } end.not_to change { AwardEmoji.count }
......
...@@ -25,7 +25,7 @@ describe 'Mark snippet as spam', :do_not_mock_admin_mode do ...@@ -25,7 +25,7 @@ describe 'Mark snippet as spam', :do_not_mock_admin_mode do
end end
shared_examples 'does not mark the snippet as spam' do shared_examples 'does not mark the snippet as spam' do
it do specify do
expect do expect do
post_graphql_mutation(mutation, current_user: current_user) post_graphql_mutation(mutation, current_user: current_user)
end.not_to change { snippet.reload.user_agent_detail.submitted } end.not_to change { snippet.reload.user_agent_detail.submitted }
......
...@@ -35,7 +35,7 @@ describe 'Getting Grafana Integration' do ...@@ -35,7 +35,7 @@ describe 'Getting Grafana Integration' do
it_behaves_like 'a working graphql query' it_behaves_like 'a working graphql query'
it { expect(integration_data).to be nil } specify { expect(integration_data).to be nil }
end end
context 'with project admin permissions' do context 'with project admin permissions' do
...@@ -45,16 +45,16 @@ describe 'Getting Grafana Integration' do ...@@ -45,16 +45,16 @@ describe 'Getting Grafana Integration' do
it_behaves_like 'a working graphql query' it_behaves_like 'a working graphql query'
it { expect(integration_data['token']).to eql grafana_integration.masked_token } specify { expect(integration_data['token']).to eql grafana_integration.masked_token }
it { expect(integration_data['grafanaUrl']).to eql grafana_integration.grafana_url } specify { expect(integration_data['grafanaUrl']).to eql grafana_integration.grafana_url }
it do specify do
expect( expect(
integration_data['createdAt'] integration_data['createdAt']
).to eql grafana_integration.created_at.strftime('%Y-%m-%dT%H:%M:%SZ') ).to eql grafana_integration.created_at.strftime('%Y-%m-%dT%H:%M:%SZ')
end end
it do specify do
expect( expect(
integration_data['updatedAt'] integration_data['updatedAt']
).to eql grafana_integration.updated_at.strftime('%Y-%m-%dT%H:%M:%SZ') ).to eql grafana_integration.updated_at.strftime('%Y-%m-%dT%H:%M:%SZ')
......
...@@ -25,7 +25,7 @@ RSpec.shared_examples 'creating award emojis marks Todos as done' do ...@@ -25,7 +25,7 @@ RSpec.shared_examples 'creating award emojis marks Todos as done' do
let(:awardable) { create(type) } let(:awardable) { create(type) }
let!(:todo) { create(:todo, target: awardable, project: project, user: user) } let!(:todo) { create(:todo, target: awardable, project: project, user: user) }
it do specify do
subject subject
expect(todo.reload.done?).to eq(expectation) expect(todo.reload.done?).to eq(expectation)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment