title: Unable to use ActiveModel::MassAssignmentSecurity
body: <p>I am trying to use some functionality in ActiveModel but I'm having trouble making everything work. I've included my class file and the test I'm running.</p>
  
  <p>The test is failing with:
  ': undefined method `attr_accessible</p>
  
  <p>I really don't know why, since MassAssignmentSecurity will bring that in and it is in fact running. I've also tried to include all of ActiveModel as well but that's doesn't work either. It doesn't seem to matter if I use include or extend to bring in the MassAssignmentSecurity.</p>
  
  <p>If I pass in some attributes in my test to exercise "assign_attributes" in the initialize, that fails as well. I'm fairly new to rails, so I'm hoping I'm just missing something really simple.</p>
  
  <p>TIA.</p>
  
  <p>Using rails 3.2.12</p>
  
  <hr>
  
  <p>my_class.rb</p>
  
  <pre><code>class MyClass
    include ActiveModel::MassAssignmentSecurity
    include ActiveModel::Validations
    include ActiveModel::Conversion
    extend ActiveModel::Naming
    extend ActiveSupport::Callbacks
  
    attr_accessible :persisted, :creds
  
    def initialize(attributes = nil, options = {})
      @persisted = false
  
      assign_attributes(attributes, options) if attributes
  
     yield self if block_given?
    end
  end
  </code></pre>
  
  <hr>
  
  <p>my_class_spec.rb</p>
  
  <pre><code>require 'spec_helper'
  
  describe MyClass do
    before do
      @testcase = MyClass.new
    end
    subject { @testcase }
  
    it_should_behave_like "ActiveModel"
  
    it { MyClass.should include(ActiveModel::MassAssignmentSecurity) }
  
    it { should respond_to(:persisted) }
  end
  </code></pre>
  
  <hr>
  
  <p>support/active_model.rb</p>
  
  <pre><code>shared_examples_for "ActiveModel" do
    include ActiveModel::Lint::Tests
  
    # to_s is to support ruby-1.9
    ActiveModel::Lint::Tests.public_instance_methods.map{|m| m.to_s}.grep(/^test/).each do |m|
      example m.gsub('_',' ') do
        send m
      end
     end
  
    def model
      subject
    end
   end
  </code></pre>