Displaying 20 results from an estimated 8000 matches similar to: "Using fixtures from IRB"
2009 Sep 09
4
what is the +hex in c++ stack traces?
What is the hex number after the method, e.g. +0x32f below?
It matches arg0 and I suspect it''s the c++ "this" pointer, aka hidden
first argument.
I would like to confirm, though.
Thanks, Joel
---
XUL`PresShell::ProcessReflowCommands(int)+0x32f
XUL`PresShell::FlushPendingNotifications(mozFlushType)
+0x19e
2006 Jun 30
8
before_filter: nil vs. true vs. false
Folks,
My understanding of how filters work is that I should return true if
everything is ok and false if not. How does the filter below work
then (from the Rails Recipies book)?
It would return nil if there''s a user in the session. Does nil count
as true?
before_filter :check_authentication
def check_authentication
unless session[:user]
session[:intended_action] =
2006 Jun 28
2
undefined method `use_transactional_fixtures=''
Folks,
I checked my test_helper.rb and it has
self.use_transactional_fixtures = true
My code was generated with 1.1.2 and I''m using 1.1.3 right now after
but the error persists.
I googled for this issue and it appears that a require is missing or
something like that. I can''t figure it out, please help!
/opt/local/bin/ruby -Ilib:test
2011 Apr 29
1
importing and filtering time series data
Folks,
I'm new to R and would like to use it to analyze web server performance data.
I collect the data in this CSV format:
1304083104.41,Y,668.856249809
1304083104.41,Y,348.143193007
First column is a <seconds.microseconds> timestamp, rows with N instead of Y need to be skipped and the last column has the same format as the first column, except it's request duration (latency).
2009 Aug 28
13
putting a running app into trace mode
Suppose I have a USDT probe in Firefox and that I''m trying to catch
the startup with a probe like this:
proc:::exec-success
/execname == "firefox-bin"/
{
start = timestamp;
}
and stop tracing when Firefox hits this USDT probe:
mozilla:::main-entry
{
exit(0);
}
How do I put the running firefox-bin into "trace mode" so that my USDT
probe fires?
Thanks, Joel
2009 Sep 09
4
usdt probes vs pid$target
I added a couple of static probes to Firefox to measure actual work
done. I could have used a pid$target probe with a function name but
work is done within an if statement, which is where I placed the
static probes.
I''m wondering about my use, though. Is the following significantly
more efficient than pid$target::FunName:entry and return?
I heard somewhere that $target does not
2006 Jun 30
4
More idiomatic way of writing a filter
Is there a more elegant way of writing this?
def verify_user
@user = User.find_by_username params[:username]
if @user.nil?
message = xml.error do |xm|
xm.message "User does not exists: #{params[:username]}"
end
render :xml => message
return false
else
true
end
end
Thanks, Joel
--
2009 Sep 09
10
dtrace overhead and proper measuring technique
I''m trying to time a function within Firefoxwith a pid$target probe
[2]. e.g
dtrace -Zqw -x dynvarsize=64m -x evaltime=preinit -p 13954 -s menu-
construct.d -s sigcont.d
elapsed: 12.7942481ms
cpu : 7.7911194ms
count : 40 times
I''m also measuring Firefox startup time by running it arguments like
this:
... file:///Users/joelr/work/mozilla/startup/startup.html#`python
2009 Oct 28
3
where do kernel data types come from?
I have a script where I can freely reference struct nameidata*, struct
vnode*, etc. on Snow Leopard.
How does DTrace know about these data types? I understand things like
#pragma D depends_on library darwin.d
where darwin.d has typedefs.
I can''t find definitions of nameidata and vnode in any D scripts,
though. How does it work?
Thanks, Joel
---
firefox for android!
2011 May 01
1
microsecond timestamp support
Does R have support for microseconds in timestamps, e.g. when reading this in
"Time","Include","Kind","Duration"
2011-04-01 14:20:36.368324,Y,U,1.03238296509
2011-04-01 14:20:35.342732,Y,C,0.0252721309662
2011-04-01 14:20:34.337209,Y,R,0.00522899627686
Thanks, Joel
--------------------------------------------------------------------------
- for hire: mac
2006 Jun 11
3
Armageddon
I''m just wondering what happened to Armageddon and whether people had
any more information/news about it. I''ve thought about comet but I think
that a flash socket would be easier to implement. Does Armageddon have
the same drawbacks as other flash sockets, namely not working over port
80 (so the companies firewall blocks it)?
--
Posted via http://www.ruby-forum.com/.
2007 Apr 17
3
using rake db:fixtures:load with rspec fixtures
Hi, I''m new to rspec. I have some fixtures in /spec/fixtures. If they
were in /test/fixtures they could be loaded with rake db:fixtures:load.
Is there any way other than a symlink to load my rspec fixtures into
the database with rake? Or, can I cause rspec to load the fixtures
from /test/fixtures?
Thanks,
Paul
2011 Aug 10
1
How to stop Rspec loading my Cucumber fixtures
I have a bunch of fixtures designed to populate the database for my Cucumber
integration tests.
But at this stage I want my database to be empty when using Rspec.
So, I moved the fixtures from `/spec/fixtures` to
`features/support/fixtures`, and updated `features/support/env.rb` to read:
Fixtures.reset_cache
fixtures_folder = File.join(RAILS_ROOT, ''features'',
2007 Aug 08
1
Transactional fixtures not working as expected
Hi!
I am quite new to BDD and I just wrote my first tests. Suddenly I
received unexpected results because in a model test I load only
users-fixtures but when the views-fixtures in which I load the
posts-fixtures, are run before this model-test, the posts-fixtures are
loaded too. I test for example if there is one record in the posts-table
after creating one post. But when there are fixtures
2006 May 09
2
load fixtures
I''m finally getting beyond using basic test fixtures, and a few questions
have popped up. Has anyone found ways to do these?
1. Use a test fixture that is named differently from its table name? We''d like
to have more than one possible fixture per table. (Or perhaps use test fixtures
named similarly but in different directories.)
2. Load a test fixture for one test method only
2006 Aug 03
2
Including ALL fixtures for a test
I am running into some issues with my functional tests because they need
info from almost every single table in the database. I have long
laundry lists of fixture names to include on these test files and then I
have to troubleshooot bizarre test failures because of a fixture that
was not included.
So is there a way to simply include all fixtures in a test? Something
like:
fixtures :all
2006 Jun 10
5
[REL] Manage Fixtures 2.0.0
Just released a new version of the _Managed Fixtures_ plugin, previously
known as _Export Fixtures_.
The name change comes with some added functionality for managing the
fixtures, primarily with two new import tasks for importing specific Models
or all of them within the test/fixtures directory.
Both new import tasks take the exported fixtures, and allow you to directly
import one, or all of
2006 Aug 04
1
All Fixtures plugin
Just released a very simple plugin for including all fixtures in your
tests. Once you have a large number of table, manually managing the
fixtures for every single test stub can be quite tedious.
Use as follows
class BlogArticleTest < Test::Unit::TestCase
all_fixtures
def test_foo
...
end
end
Couldn''t be easier. More info here:
2006 May 23
2
Putting fixtures into subdirectories
I want to organize my fixtures just like the namespace of my models. So
for example if I have a model Company::Employee I''d like the fixture to
be in fixtures/company/employees.yml.
However, I can''t figure out how to specify the path of the fixture file.
If I do:
fixtures :employees
in my unit test it can''t find the fixture file. Any suggestions?
Thanks,
Todd
2006 Mar 23
7
Fixtures just Do Not Work for Me
Hello,
I have been struggling to get fixtures to work here with no success.
They just Do Not Work For Me (tm).
I have created a model named Headline with the `generate'' script and
modified the test/fixtumes/headlines.yml as follows
----------
gita:
id: 1
author: raulseixas
title: gita
happened_at: 2005-01-01 00:00:00
description: gita
This is the CD reissue of