Skip to content

Better error message for missing attribute #47

@jaredmoody

Description

@jaredmoody

When an attribute doesn't exist on a model,

it { should normalize_attribute(:foo) }

gives the error:

Failure/Error: it { should normalize_attribute(:foo) }
     NoMethodError:
       undefined method `old_foo=' for #<Bar:0x007fe72c21f2a8>

It seems to me this error message should be more useful by telling you the attribute is missing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions