Sha256: 1096c2d4172482cd58bf592c778dbf68b0fe5b7adc3e96a13d0dd6ff74162fcf

Contents?: true

Size: 589 Bytes

Versions: 1

Compression:

Stored size: 589 Bytes

Contents

require "spec_helper"

describe AwesomeTranslations::ModelInspector::Attribute do
  let(:user_inspector) { AwesomeTranslations::ModelInspector.model_classes.select { |model_inspector| model_inspector.clazz == User }.first }
  let(:email_attr) { user_inspector.attributes.select { |attribute| attribute.name == "email" }.first }

  it "#i18n_key" do
    expect(email_attr.i18n_key).to eq "activerecord.attributes.user.email"
  end

  it "#name" do
    expect(email_attr.name).to eq "email"
  end

  it "#model_inspector" do
    expect(email_attr.model_inspector.clazz).to eq User
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
awesome_translations-0.0.25 spec/lib/model_inspector/attribute_spec.rb