similar to: Accessing fixtures from unit tests

Displaying 20 results from an estimated 1000 matches similar to: "Accessing fixtures from unit tests"

2006 Apr 13
3
Salted Hash Login Generator problem
Im trying to install salted and get errors when running the rake test... /usr/bin/ruby1.8 -Ilib:test "/usr/lib/ruby/gems/1.8/gems/rake-0.7.0/lib/rake/rake_test_loader .rb" "test/unit/localization_test.rb" "test/unit/user_test.rb" Loaded suite /usr/lib/ruby/gems/1.8/gems/rake-0.7.0/lib/rake/rake_test_loader Started ........F....E Finished in 0.108794 seconds. 1)
2006 Jul 31
0
validates_confirmation_of won''t work
Hello folks, this is the first time I''ve written to this forum. If there''s already a topic on this, forgive me but the search isn''t working right now. I seem to have a problem validating confirmation of a password. The first two snippets are some model code and some test code that work just fine: ---------------------------- class Challenge < ActiveRecord::Base
2009 Nov 07
0
wrong argument type Mysql (expected Struct) running rake with Ruby 1.9 / Rails 2.3.3
I''m use Ruby 1.9 via rvm and Rails 2.3.3. I''m on OS X 10.5 and I have the mysql 2.8.1 gem installed. When I run rake on my rails app, I get the error "wrong argument type Mysql (expected Struct)". I can run the app fine with script/server and script/console fine. Is anyone else having this problem or know what might cause this problem? Here''s the stack
2006 Jan 22
23
calculate users age
i know it''s probably really simple, how do i work out someone''s age if i have their d.o.b. stored as a date in my db. cheers -- Posted via http://www.ruby-forum.com/.
2006 Jun 08
1
Test errors
I''m working on learning user auth and ran a test/unit/test.rb and seem to have stumbled across some errors. This is from a tutorial on the web and I pretty much copied the code and checked syntax so not sure where it''s wrong. I thought I''d throw it out since I"m new to ROR and the error didn''t look too bad ;), perhaps someone would have a better
2012 Nov 17
0
How to get more debug information in test log ?
Im one of my unit tests, I got an error I cannot even start looking for the issue as few information are logged ... Using the test console , there is no error at all : > rails console test >> Loading test environment (Rails 3.2.9.rc3) > site1 = FactoryGirl.create(:cms_site, label: "booboo") >> BEGIN .. .. >> but running my tests > unit > ruby -Itest
2006 Feb 22
3
Unit test failure - nil object?
I''m following instructions in the Agile book, page 146 for testing an object update to the database. Here''s my code: def test_update assert_equal "jack@smiths.com", @user.email @user.email = "jack@smiths.org" assert @user.save, @user.errors.full_messages.join("; ") @user.reload assert_equal @user.email,
2006 Apr 04
3
model validates twice in tests, produces duplicate errors
In my unit tests for my User model, I''m testing some validation cases. What is really strange, and driving me crazy, is that in the unit tests, it seems like the save method is causing my validations to execute twice, and produce duplicate error messages. This is making my tests fail (because I''m checking for the number of errors that I expect). In the web browser, only one error
2006 Jun 30
2
Installing products through gem on ubuntu
I''m trying to install mongrel and sqlite3 through the gem command on ubuntu. I''m have in the same problem with both. If I try to do sudo gem install sqlite3, it says GemNotFoundException. If I run the same command without sudo, I don''t have permission to some directory: pbarry@pbarry-laptop:~/downloads/rubygems-0.9.0$ sudo gem install sqlite3-ruby ERROR: While
2006 Jul 23
0
[PATCH] (+tests) with_scope :order doesn''t work with included associations
(I''ve had this patch lying around for a couple of weeks, waiting for Trac to come back up. noradio''s already had a look at it on IRC. What''s the best way to submit patches while Trac is down?) with_scope doesn''t support :order in the presence of :include. For example: {{{ # We''re testing the interaction between :order, :include, and
2005 Oct 27
2
Fixtures are not loading into instance variables. Why not?
Hi, I have a fixture in a unit test and I see that the fixture is loaded correctly into the database table, but no instance variables are created. So now I''m stuck. More background: this is my first RoR project and I have just installed the SaltedLoginGenerator and generated its output. Running the unit tests gives an error, so I cut it down to just 1 test:
2019 Jan 17
1
Authentication lost within session
When I open the mail client (thunderbird), I can access the mailboxes and all of a sudden, I am loosing the authenticated session. Any idea's where to look? Jan 17 12:42:04 mail04 dovecot: imap-login: Login: user=<usertest>, method=PLAIN, rip=192.168.10.219, lip=192.168.10.44, mpid=13403, TLS, session=<NsYo4qV/CNfAqArb> Jan 17 12:42:04 mail04 dovecot: imap(usertest): Debug:
2012 Apr 04
1
sambaHomePath usage
My name is Camelia Botez and I'm linux system admin. I try to configure samba server usind ldap authentication and different sambaHomePath from login home directory. For ex. A user user_test has his home (login) directory /home/user_test and I want , using samba map on windows to have /srv/user_test home directory for this user. We included in ldap schema 2 attributes sambaHomeDrive (H: ) And
2003 Aug 13
0
Password change problems
Dear Sir I?m terribly confused about one problem in our environment. We have one NIS+SAMBA environment, running in E450 with Solaris 7. Apparently, after one system patch application, the password change is not working. Please look this: 1) In the server, with root account: # passwd user_test New password: Re-enter new password: NIS passwd/attributes changed on server passwd (SYSTEM): Password
2015 Aug 25
2
Import USER and PASSWORD Samba3+OpenLadp TO Samba4
That's my ldif I can import successfully. The problem is not passing the password for the Samba4... dn: cn=usertest,cn=users,dc=dominio,dc=local objectClass: usertest sAMAccountName: usertest displayName: User Test homeDirectory: /home/usertest uid: usertest cn: usertest uidNumber: 10211 userPassword:: e1NTSEF9Mk1Ya0NSTGsxQjRDbGhmcnk5MTYybEFMOEVoTFowUkg= sn: usertest givenName: usertest --
2006 Oct 05
0
Where to add ActiveRecord::Base#find! tests
Just looking at adding the ActiveRecord::Base#find! method that was spoken about a while ago now, and just wondering what''s the best way to add these tests in? My problem is that for 75% of the tests in finder_test.rb [1] I also want to ensure that find! or find_by_name! or find_by_sql! works alongside the regular finds. I can duplicate the tests: def test_find
2005 Dec 29
7
belongs_to causing NoMethodError exceptions ... ?
I''ve got a really strange problem using belongs_to. I apologize in advance for the length... this is going to take a while to explain. Basic idea: Creating a User requires that the user enter an email address and activation key that matches an existing PendingUser. After creating the user successfully, that pending user should be marked as "used". The problem: When I
2015 Oct 27
1
Proxy with director accept only plain login
Hello, i'm test system dovecot (proxy with director) and backend storage, auth LDAP server (user plain passwords) If i use plain auth, work fine. If connect DIGEST-MD5 or CRAM-MD5 proxy not redirect connection (Requested DIGEST-MD5 scheme, but we have a NULL password) ### Frontend proxy+director # dovecot -n # 2.2.19: /usr/local/etc/dovecot/dovecot.conf # OS: FreeBSD 10.2-RELEASE amd64
2019 Jun 19
2
Fwd: Re: Fwd: Re: Fwd: Re: Kerberos and NTLMv2 authentication
The 2 commands works : # getent passwd MYDOMAIN\\usertest MYDOMAIN\\usertest:*:10430:14513:user TEST:/home/usertest:/bin/bash # getent group MYDOMAIN\\"Utilisateurs du domaine" MYDOMAIN\utilisateurs du domaine:x:14513: I have to put "Utilisateurs du domaine" instead of Domain\ Users because the Windows AD is a french AD. Le 19/06/2019 ? 12:32, Rowland penny via samba a
2003 Aug 26
1
change password on w2k workstation
Hi!! I'm not able to change a user password on a workstation and with smbpasswd when I'm log. ex: [usertest@pc070 usertest]$ smbpasswd Old SMB password: New SMB password: Retype new SMB password: machine 127.0.0.1 rejected the password change: Error was : RAP86: The specified password is invalid. Failed to change password for usertest so when I'm root, that's work The log