Remove deprecated way of ignoring attributes

This commit is contained in:
Joshua Clayton 2012-03-09 15:32:00 -05:00
parent e99c070c01
commit f68a617a8d
2 changed files with 0 additions and 24 deletions

View File

@ -12,11 +12,6 @@ module FactoryGirl
@ignored = ignored
end
def ignore
$stderr.puts "DEPRECATION WARNING: Use ignore block syntax instead of calling #ignore"
@ignored = true
end
def to_attributes
build
end

View File

@ -69,25 +69,6 @@ describe "transient attributes" do
end
end
describe "deprecated way of ignoring attributes" do
before do
define_model("User", :name => :string)
FactoryGirl.define do
factory :user do
rockstar(false).ignore
name { "John Doe#{" Rockstar" if rockstar}" }
end
end
end
it "assigns attributes correctly" do
FactoryGirl.build(:user, :rockstar => true).name.should == "John Doe Rockstar"
FactoryGirl.build(:user).name.should == "John Doe"
end
end
describe "transient sequences" do
before do
define_model("User", :name => :string)