thoughtbot / shoulda-matchers

Simple one-liner tests for common Rails functionality
https://matchers.shoulda.io
MIT License
3.53k stars 909 forks source link

have_db_column.().with_options() should raise error on misspelled argument #1281

Closed recurator closed 3 years ago

recurator commented 4 years ago

ruby 2.6.3p62 (2019-04-16 revision 67580) [x86_64-linux] Rails 6.0.0 RSpec 3.8

spec/models/comment_spec.rb:

require 'rails_helper'
RSpec.describe Comment, type: :model do
  it { is_expected.to have_db_column(:created_at).of_type(:datetime).with_options(preccision: 6, null: false)
end

*** Note spelling error: preccision

It is expected to raise error but no error is raised.

mcmire commented 3 years ago

Closing this since #1358 was merged.