Displaying 20 results from an estimated 4000 matches similar to: "Locating an arbitrary fixture..."
2007 May 27
1
annotate_models plugin to annotate RSpec specs and fixture
I have found useful to have the table information associated to models
disp?ayed in the models and fixtures files of my rails applications.
If you want to add this information to the spec_fixtures and specs add
the following patch to your plugin.
Index: vendor/plugins/annotate_models/lib/annotate_models.rb
===================================================================
---
2004 Sep 22
1
idmap_ad: sid to uid conversion fails
I have two boxes on which I am trying to get idmap_ad
(from xad_oss_plugins) to provide uid/gid mapping, and
am getting the error:
"Could not convert sid <sid of some_user> to uid"
The story so far goes like this:
Without the line
"idmap backend = ad:ldap://<PDC's FQDN>/" in smb.conf,
I can successfully do all of:
#> wbinfo -S $(wbinfo -n some_user | awk
2009 Nov 30
1
Dovecot 1.2.x masteruser proxy problem
Greetings to all
I need a masteruser/proxy account for some applications to be implemented
and i am having some problems. Normal users are proxyied through
ldap queries to the remote machine and this is working like it sopose to,
but i can't make the master user to work. Below are both the dovecot.conf
and dovecot-ldap.conf and verbose logs on the proxy machine.
If i log directly on the
2002 Mar 30
1
File permission umask howto?
I'm trying to figure out how to cause rsync to
create the file on the backup server with 700 permission
and specific owner "some_user" (not root)
I try to do it in several way with no success.
The command I'm using is:
rsync -r -t -v -z /dir some_user@server::module
so that it don't copy permission
It always give the files 744 permission, that mean that every on can read
2011 Dec 25
1
Fixtures vs Fixture class, what is the intended purpose?
Hello,
i am trying to fix the code for fixtures in rails because it is buggy
and internal variable names are confusing, could somebody please explain
to me what is the intended purpose of Fixture and Fixtures classes
respectively?
For example, why do we need both `Fixtures.initialize`and
`Fixture.initialize`? They both "initialize" a single fixture, and in
fact `Fixture.initialize`
2007 Oct 26
1
Spec custom finders
I have some finders in my models where I write some of the sql myself. I
of course want to test these, but am not sure the best way. Should I just
let them roll through to the db, and verify they return the correct
objects based on the fixtures I load, or should I spec the actual query? I
know that DB access is sort of frowned upon, but is this a situation where
it is more or less acceptable? My
2018 May 02
2
samba 4 joining samba 3 pdc - group mismatch
Hi all
Background: I am not a samba expert, not even close!
I have a ancient samba 3 (Server role: ROLE_DOMAIN_PDC) and I intend to
migrate all files to a samba 4 (Server role: ROLE_DOMAIN_MEMBER)
Users will stay in S3 for now.
Samba 4 joined samba 3 with no problems.
I rsync'ed all files and its permissions (rsync -a ...).
But...
I cannot find a way that makes S4 sees S3 users and groups
2006 Dec 14
1
create and destroy fixture manually in method
Hi,
My test case has two fixtures and eight methods. But one of the eight
methods need one more fixture. How do I solve this? Okay, I put the
additional fixture in common place so every method has additional access
to the additional fixture. The problem is the additional fixture depend
on that two fixtures (foreign key). When I run the test, it complains
something like this:
2006 May 09
1
leftover fixture data causing errors
Maybe I''m not getting fixtures, but... I''m having problems as I start using
fixtures in functional tests.
Data is left in my test database after running functional tests. Not the data
created by the test-method (I''m using transactional fixtures), but data from the
fixtures themselves. Fixture loading will delete & reload the data again when
the test is re-run, but
2005 Oct 28
2
Accessing fixture
I have a very simple problem. I can''t seem to access
a the fixture by name
I have a sites.yml with:
simple_site:
id: 1
name: demo
description: A demo site
created_on: 2005-10-25 00:00:00
updated_on: 2005-10-25 00:00:00
And I have a test class as:
require File.dirname(__FILE__) + ''/../test_helper''
class SiteTest < Test::Unit::TestCase
fixtures
2006 May 30
2
acts_as_queue
wondering if anyone tried this patch. (i havent, seeing as its 1228
lines long, 10 months old, and cant take serious a patch many orders
larger than competing web frameworks)
in many cases i want to keep about 10 things around, eg recent searches,
new items (spanning multiple classes), referers, page views, without
logging them for perpetuity. so i guess this isnt a normal queue, more
like a
2006 Jan 16
2
My first test - named fixture not autoloading instance variable
I''m trying to write a test like the one at the bottom of page 148 in
Agile Rails.
I''m using rails 1.0
I''ve created the fixture correctly I''m pretty sure because the test
database table is being populated per the fixture.
I have what I think is a simple unit test:
=========
require File.dirname(__FILE__) + ''/../test_helper''
class CaseTest
2006 Apr 26
3
Test fixture syntax
OK, I know I''m doing something bone-headed, but I can''t for the life of
me figure it out.
I''ve read the test fixtures Rdoc about eight dozen times, and it says
(to me) that if I have a YAML fixture file, dogs.yml that looks like
this:
fido:
id: 1
breed: Terrier
fifi:
id: 2
breed: Poodle
Then I can include
fixtures :dogs
in my functional test, and
2009 Jul 13
1
Running a single fixture.
Hello. I need to run a single fixture on my server as part of an
update to my application. I noticed that the other tables lost their
data when I run "rake db:fixtures:load". How do I make it so that only
a single fixture runs and ignores the rest?
2006 May 22
1
Agile Web Dev unit test fails with fixture instance variable
I''m following Agile Edition 1. On page 148 it suggests using instance
variables named after the fixture, for example:
assert_equal @version_control_book.id, @product.id
When I introduce this type of instance variable into my test, I get the
following error:
1) Error:
test_not_owner(GroupTest):
RuntimeError: Called id for nil, which would mistakenly be 4 -- if you
really wanted the
2006 Aug 10
0
Load a fixture manually in setup?
I''m running into a problem where one of my fixtures uses ERb to get an
id for a row that isn''t created yet. In setup, I create that row. Since
it appears that fixtures are loaded before setup is run, that''s a
problem.
I can''t put the row creation in a fixture - its part of the business
rules of one of my models.
Anyone know how to load a fixture manually
2006 Nov 04
0
How to reference fixture under folder ?
Hello all,
I have a fixture under folder-grouping :
./fixtures/foo/bars.yml
I need to reference the data in bars during functional test.
methods.sort reveals ''foo/bars'' as a method in the current context
(breakpointed),
but I don''t know how to reference a method called ''foo/bars''.
- OR - how should i reference the fixture when I''m using
2006 Feb 08
0
Fixture access question
Hi,
I want to add the basic model record create tests for my rails app
as in the "Agile Web Development with Rails" example:
i.e. (header stuff and boring repitition missed)
def test_create
assert_kind_of Requirement, requirements(:requirement_1)
assert_equal <at>requirements["requirement_1"]["name"],
requirements(:requirement_1).name
end
Now I''m
2008 Apr 29
0
Fixture Scenarios plugin
Just curious if anything special needs to be done to use the Rails
fixture scenarios plugin(http://code.google.com/p/fixture-scenarios/)
with rspec? Would I just create the "scenarios" inside the spec/fixtures
dir, as opposed to the test/fixtures dir?
Thanks,
Steve
2006 Mar 02
1
Fixture accessors broken for polymorphism, in need of redesign
Ticket 4052 (http://dev.rubyonrails.org/ticket/4052) just came through
trac, which introduces the need for a better way to access fixtures. I
believe the basic problem is the same as 3935
(http://dev.rubyonrails.org/ticket/3935) in that the accessor method
which is constructed by the fixture call can''t infer the class name
from the table name. The band-aid in 3935 was to allow you to