Displaying 2 results from an estimated 2 matches for "initialize_user".
2012 Nov 08
1
validates_uniqueness_of(*attr_names) w scope not working in unit test
Rails 3.2.8
Very strange , it works in dv mode console , but not in a unit test
class User < ActiveRecord::Base
belongs_to :subdomain
validates_uniqueness_of :email, :scope => :subdomain_id
class UserTest < ActiveSupport::TestCase
def initialize_user
@booboo = FactoryGirl.create(:subdomain, name: "booboo")
@coocoo = FactoryGirl.create(:subdomain, name: "coocoo")
FactoryGirl.create(:user, subdomain_id: @booboo[:id], email:
"user.doe-PV5Ro7/Mrj4@public.gmane.org", password: "UkZaHWcy", password...
2012 Nov 17
0
How to get more debug information in test log ?
...rror: undefined method `respond_to?='' for
#<Cms::Page:0x007fa0435bba68>
test/factories/cms_layout.rb:14:in `block (3 levels) in <top (required)>''
test/factories/cms_site.rb:17:in `block (3 levels) in <top (required)>''
test/unit/user_test.rb:58:in `initialize_user''
I have a nested FactoryGirl records creation ( cms_site > cms_layout >
cms_page )
why it coule be running fine in console and NOt in test ? how can I search
for more info ? thanks
--
You received this message because you are subscribed to the Google Groups "Ruby on R...