Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

AS::Deprecation prefixes messages with 'DEPRECATION WARNING: ' already

  • Loading branch information...
commit 28e3c25618398d52712592da5786c1f207881f4c 1 parent bca13f1
@joshuaclayton joshuaclayton authored
Showing with 9 additions and 9 deletions.
  1. +9 −9 lib/factory_girl/syntax/vintage.rb
View
18 lib/factory_girl/syntax/vintage.rb
@@ -23,7 +23,7 @@ module ::Factory
# Yields: +Factory+
# The newly created factory.
def self.define(name, options = {})
- ActiveSupport::Deprecation.warn "DEPRECATION WARNING: Factory.define is deprecated; use the FactoryGirl.define block syntax to declare your factory.", caller
+ ActiveSupport::Deprecation.warn "Factory.define is deprecated; use the FactoryGirl.define block syntax to declare your factory.", caller
factory = FactoryGirl::Factory.new(name, options)
proxy = FactoryGirl::DefinitionProxy.new(factory)
yield(proxy)
@@ -46,7 +46,7 @@ def self.define(name, options = {})
#
# Factory.sequence(:email) {|n| "somebody_#{n}@example.com" }
def self.sequence(name, start_value = 1, &block)
- ActiveSupport::Deprecation.warn "DEPRECATION WARNING: Factory.sequence is deprecated; use the FactoryGirl.define block syntax to declare your sequence.", caller
+ ActiveSupport::Deprecation.warn "Factory.sequence is deprecated; use the FactoryGirl.define block syntax to declare your sequence.", caller
FactoryGirl.register_sequence(Sequence.new(name, start_value, &block))
end
@@ -59,7 +59,7 @@ def self.sequence(name, start_value = 1, &block)
# Returns:
# The next value in the sequence. (Object)
def self.next(name)
- ActiveSupport::Deprecation.warn "DEPRECATION WARNING: Factory.next is deprecated; use FactoryGirl.generate instead.", caller
+ ActiveSupport::Deprecation.warn "Factory.next is deprecated; use FactoryGirl.generate instead.", caller
FactoryGirl.generate(name)
end
@@ -88,31 +88,31 @@ def self.next(name)
# # will be used instead.
# Factory(:post, user_id: 1)
def self.alias(pattern, replace)
- ActiveSupport::Deprecation.warn "DEPRECATION WARNING: Factory.alias is deprecated; use FactoryGirl.aliases << [pattern, replace] instead.", caller
+ ActiveSupport::Deprecation.warn "Factory.alias is deprecated; use FactoryGirl.aliases << [pattern, replace] instead.", caller
FactoryGirl.aliases << [pattern, replace]
end
# Alias for FactoryGirl.attributes_for
def self.attributes_for(name, overrides = {})
- ActiveSupport::Deprecation.warn "DEPRECATION WARNING: Factory.attributes_for is deprecated; use FactoryGirl.attributes_for instead.", caller
+ ActiveSupport::Deprecation.warn "Factory.attributes_for is deprecated; use FactoryGirl.attributes_for instead.", caller
FactoryGirl.attributes_for(name, overrides)
end
# Alias for FactoryGirl.build
def self.build(name, overrides = {})
- ActiveSupport::Deprecation.warn "DEPRECATION WARNING: Factory.build is deprecated; use FactoryGirl.build instead.", caller
+ ActiveSupport::Deprecation.warn "Factory.build is deprecated; use FactoryGirl.build instead.", caller
FactoryGirl.build(name, overrides)
end
# Alias for FactoryGirl.create
def self.create(name, overrides = {})
- ActiveSupport::Deprecation.warn "DEPRECATION WARNING: Factory.create is deprecated; use FactoryGirl.create instead.", caller
+ ActiveSupport::Deprecation.warn "Factory.create is deprecated; use FactoryGirl.create instead.", caller
FactoryGirl.create(name, overrides)
end
# Alias for FactoryGirl.build_stubbed.
def self.stub(name, overrides = {})
- ActiveSupport::Deprecation.warn "DEPRECATION WARNING: Factory.stub is deprecated; use FactoryGirl.build_stubbed instead.", caller
+ ActiveSupport::Deprecation.warn "Factory.stub is deprecated; use FactoryGirl.build_stubbed instead.", caller
FactoryGirl.build_stubbed(name, overrides)
end
end
@@ -122,7 +122,7 @@ def self.stub(name, overrides = {})
# Example:
# Factory(:user, name: 'Joe')
def Factory(name, attrs = {})
- ActiveSupport::Deprecation.warn "DEPRECATION WARNING: Factory(:name) is deprecated; use FactoryGirl.create(:name) instead.", caller
+ ActiveSupport::Deprecation.warn "Factory(:name) is deprecated; use FactoryGirl.create(:name) instead.", caller
FactoryGirl.create(name, attrs)
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.