aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2017-11-15 16:05:29 +0100
committerTeddy Wing2017-11-15 16:20:31 +0100
commit28b4f328e455a425c6222cdd249515ea958a45d3 (patch)
tree98db97e3ad2892b36f6a49d70ab1fdc19a38e99a
parent21c786e856a9cf3c211468edf12825b390da7b6a (diff)
downloadchouette-core-28b4f328e455a425c6222cdd249515ea958a45d3.tar.bz2
schema_spec: Change spaces to `\s`
Robert wisely recommended using `\s` just in case somehow tabs end up in the `schema.rb` file. Refs #4951
-rw-r--r--spec/db/schema_spec.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/db/schema_spec.rb b/spec/db/schema_spec.rb
index b06e27bc7..b2f259abd 100644
--- a/spec/db/schema_spec.rb
+++ b/spec/db/schema_spec.rb
@@ -15,15 +15,15 @@ RSpec::Matchers.define :use_bigint_keys do
expected_line = line
# Primary key
- if line =~ /create_table / &&
- !(line =~ /id: (:bigserial|false)/)
- expected_line = line.sub(/(create_table "\w+", )/, '\1id: :bigserial, ')
+ if line =~ /create_table\s/ &&
+ !(line =~ /id:\s+(:bigserial|false)/)
+ expected_line = line.sub(/(create_table\s"\w+",\s)/, '\1id: :bigserial, ')
end
# Foreign key
- if line =~ /t\.integer +"\w+_id"/ &&
+ if line =~ /t\.integer\s+"\w+_id"/ &&
!(line =~ /limit: 8/)
- expected_line = line.sub(/(t.integer +"\w+")/, '\1, limit: 8')
+ expected_line = line.sub(/(t.integer\s+"\w+")/, '\1, limit: 8')
end
@original += line