fix warnings in tests
This commit is contained in:
parent
6943b37d64
commit
b2230076ed
|
@ -6,7 +6,7 @@ class MockController
|
||||||
end
|
end
|
||||||
|
|
||||||
def action_name
|
def action_name
|
||||||
@action_name || "edit"
|
defined?(@action_name) ? @action_name : "edit"
|
||||||
end
|
end
|
||||||
|
|
||||||
def url_for(*args)
|
def url_for(*args)
|
||||||
|
|
|
@ -45,6 +45,7 @@ class User
|
||||||
:post_count, :lock_version, :amount, :attempts, :action, :credit_card
|
:post_count, :lock_version, :amount, :attempts, :action, :credit_card
|
||||||
|
|
||||||
def initialize(options={})
|
def initialize(options={})
|
||||||
|
@new_record = false
|
||||||
options.each do |key, value|
|
options.each do |key, value|
|
||||||
send("#{key}=", value)
|
send("#{key}=", value)
|
||||||
end if options
|
end if options
|
||||||
|
@ -55,7 +56,7 @@ class User
|
||||||
end
|
end
|
||||||
|
|
||||||
def persisted?
|
def persisted?
|
||||||
!(@new_record || false)
|
!@new_record
|
||||||
end
|
end
|
||||||
|
|
||||||
def company_attributes=(*)
|
def company_attributes=(*)
|
||||||
|
|
Loading…
Reference in New Issue