Remove deprecated way of ignoring attributes
This commit is contained in:
parent
e99c070c01
commit
f68a617a8d
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue