FactoryGirl built My::Class object doesn't return true on is_a?(My::Class)
<p>Code is better than words here</p>

<pre><code>e = FactoryGirl.build(:company_employee)
e.class                    # =&gt; Company::Employee
e.is_a?(Company::Employee) # =&gt; false
</code></pre>

<p>Is that a bug ? (note that is returns true if I do it with simpleer models like user). Could the bug come from the namespace addition ?</p>

<p>Classes</p>

<pre><code># factories/company_employee.rb
FactoryGirl.define do
  factory :company_employee, class: Company::Employee do
    ...
  end
end

# models/company/employee.rb
class Company::Employee &lt; Professional
  ...
end
</code></pre>