Skip to content

Instantly share code, notes, and snippets.

@DBA
Created August 17, 2010 23:17
Show Gist options
  • Save DBA/532568 to your computer and use it in GitHub Desktop.
Save DBA/532568 to your computer and use it in GitHub Desktop.
require 'spec_helper'
context Post do
subject { Factory.build(:post) }
describe "accessible attributes" do
it "defines the attributes that are mass assignable" do
Post._accessible_attributes.to_a == ["user_id", "title", "body"]
end
end # attr_accessible
end # Context
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment