summaryrefslogtreecommitdiff
path: root/spec/rubocop/cop/migration/safer_boolean_column_spec.rb
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2017-09-19 17:25:42 +0200
committerRobert Speicher <rspeicher@gmail.com>2017-12-22 08:34:44 -0600
commita2d39b80109f006ff63752cfaed5e458f9443d1d (patch)
treecc5a0f06ba04448dbf025dd95a6e39686343d256 /spec/rubocop/cop/migration/safer_boolean_column_spec.rb
parent299e04e318728d4ee5857379f8fb350c944a0b4e (diff)
downloadgitlab-ce-a2d39b80109f006ff63752cfaed5e458f9443d1d.tar.gz
Use gitlab-styles
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'spec/rubocop/cop/migration/safer_boolean_column_spec.rb')
-rw-r--r--spec/rubocop/cop/migration/safer_boolean_column_spec.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/rubocop/cop/migration/safer_boolean_column_spec.rb b/spec/rubocop/cop/migration/safer_boolean_column_spec.rb
index 1006594499a..1c4f18fbcc3 100644
--- a/spec/rubocop/cop/migration/safer_boolean_column_spec.rb
+++ b/spec/rubocop/cop/migration/safer_boolean_column_spec.rb
@@ -32,7 +32,7 @@ describe RuboCop::Cop::Migration::SaferBooleanColumn do
sources_and_offense.each do |source, offense|
context "given the source \"#{source}\"" do
it "registers the offense matching \"#{offense}\"" do
- inspect_source(cop, source)
+ inspect_source(source)
aggregate_failures do
expect(cop.offenses.first.message).to match(offense)
@@ -49,7 +49,7 @@ describe RuboCop::Cop::Migration::SaferBooleanColumn do
inoffensive_sources.each do |source|
context "given the source \"#{source}\"" do
it "registers no offense" do
- inspect_source(cop, source)
+ inspect_source(source)
aggregate_failures do
expect(cop.offenses).to be_empty
@@ -61,14 +61,14 @@ describe RuboCop::Cop::Migration::SaferBooleanColumn do
end
it 'registers no offense for tables not listed in SMALL_TABLES' do
- inspect_source(cop, "add_column :large_table, :column, :boolean")
+ inspect_source("add_column :large_table, :column, :boolean")
expect(cop.offenses).to be_empty
end
it 'registers no offense for non-boolean columns' do
table = described_class::SMALL_TABLES.sample
- inspect_source(cop, "add_column :#{table}, :column, :string")
+ inspect_source("add_column :#{table}, :column, :string")
expect(cop.offenses).to be_empty
end
@@ -77,7 +77,7 @@ describe RuboCop::Cop::Migration::SaferBooleanColumn do
context 'outside of migration' do
it 'registers no offense' do
table = described_class::SMALL_TABLES.sample
- inspect_source(cop, "add_column :#{table}, :column, :boolean")
+ inspect_source("add_column :#{table}, :column, :boolean")
expect(cop.offenses).to be_empty
end