mirror of
https://github.com/internetee/registry.git
synced 2025-05-28 07:02:04 +02:00
parent
e8dac5e45d
commit
ee3ec69e54
9 changed files with 404 additions and 132 deletions
9
spec/support/matchers/alias_attribute.rb
Normal file
9
spec/support/matchers/alias_attribute.rb
Normal file
|
@ -0,0 +1,9 @@
|
|||
RSpec::Matchers.define :alias_attribute do |alias_name, original_name|
|
||||
match do |actual|
|
||||
actual.class.attribute_alias(alias_name) == original_name.to_s
|
||||
end
|
||||
|
||||
failure_message do |actual|
|
||||
"expected #{actual.class.name} to alias attribute :#{alias_name} by :#{original_name}"
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue