Displaying 20 results from an estimated 2000 matches similar to: "Wild ideas about fixtures"
2006 Feb 15
3
UserEngine testing
Hi Everybody,
I''m playing around with the engines created by James Adam and I bumped
into the following.
I would like the rake bootstrap command to use the testing database and
I just know there''s
an easy way to do so.
I could have just copied the dev db''s to the test db''s but I think I''m
missing something fundamental here.
Hints are very welcome.
2008 Jun 19
0
Error loading fixtures with classes that set_table_name
Hi all,
I just hit a big wall involving a legacy database. I''ve got an active
record class called "School" that uses "set_table_name ''old_school''" to
map to a legacy database table:
class School < ActiveRecord::Base
set_table_name ''old_school''
end
It works great, until I''m testing and I want to use fixtures.
2008 Jun 23
0
Error loading fixtures for classes that set_table_name
Hi all,
I just hit a big wall involving a legacy database. I''ve got an active
record class called "School" that uses "set_table_name ''old_school''" to
map to a legacy database table:
class School < ActiveRecord::Base
set_table_name ''old_school''
end
It works great, until I''m testing and I want to use fixtures.
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:
2006 Mar 20
2
Testing Models And Fixtures
I have finally decided to look into testing and I am going through
the examples in the AWDWR book and I tried the following and it does
not work... even though I don''t see why it shouldn''t.
===========
posts.yml
===========
basic_post:
id: 1
title: Title
body: Body
created_at: 2006-02-01 00:00:00
updated_at: 2006_02-02 00:00:00
2017 Jul 28
1
R Programming help needed - Returning dataframes + 2 Variables dynamically
The returned values are in the list you assign to test_data, the original x and y are not modified, i.e the returned value for x will be test_data[[1]] and for y will be test_data[[2]]. Using the same variable names in the function and test is perhaps what is leading to confusion.
> On 28 Jul 2017, at 09:13, Vijaya Kumar Regati <VijayaKumar.Regati at m3bi.com> wrote:
>
> Hi,
>
2017 Jul 28
2
R Programming help needed - Returning dataframes + 2 Variables dynamically
Hi,
Can someone please help me on below issue I am facing :
I am trying to play with returning a dataframe+2 variables using a fn.
But facing an issue :
Error in Logic_fn(c(x, y)) : argument "y" is missing, with no default
This is the code I am using :
x <- 0
y <- 0
Logic_fn <- function(x,y){
x <- x + 1
y < y + 1
test_data <- rbind(x,y)
test_data <-
2006 May 02
0
3D graphing Libraries
Unfortunately a number of our clients need extensive reporting
capabilities. There are a number of Java 3d graphing libraries like the
link below and PHP offerings out there.
http://big.faceless.org/products/graph/index.jsp
.Net has its new report viewer control for ASP.net 2.0 which allows you
to create 2d/3d reports containing pie charts, line graphs etc. Whats
cool about this control is
2017 Jul 28
0
R Programming help needed - Returning dataframes + 2 Variables dynamically
Hi,
That was very useful information. Thanks.
But still I am not able to get the desired output with updated code.
Kindly help if you have any further thoughts ...
Updated code :
x <- 0
y <- 0
Logic_fn <- function(x,y){
print("Passed Values")
print(x)
print(y)
x <- x + 1
y <- y + 1
print("After addition :")
print(x)
print(y)
test_data <- rbind(x,y)
2017 Nov 14
1
Re: [PATCH v12 3/3] New tool: virt-builder-repository
On Mon, Nov 13, 2017 at 02:56:12PM +0100, Cédric Bosdonnat wrote:
> +let checksums_get_sha512 = function
> + | None -> None
> + | Some csums ->
> + try
> + Some (List.find (
> + function
> + | Checksums.SHA512 _ -> true
> + | _ -> false
> + ) csums)
> + with Not_found -> None
This is still a bit
2006 Apr 28
2
Accessing fixtures from unit tests
I have set up some fixtures in test/fixtures/users.xml:
# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
admin:
id: 1
username: admin
password: admin
pbarry:
id: 2
username: pbarry
I have a unit test for my user model:
require File.dirname(__FILE__) + ''/../test_helper''
class UserTest < Test::Unit::TestCase
fixtures :users
def
2007 Oct 13
1
Formatted Routes?
Is anyone using formats with the url generator in trunk? I can''t
figure it out and it seems to be unimplemented in the router code.
I want to do something like
url(:articles, :format => "xml")
# => /articles.xml
or
url(:formatted_articles, :format => "xml")
--
Geoffrey Grosenbach
........................
PeepCode Screencasts
http://peepcode.com
2007 Jun 19
1
Plugin Requirements
I like the style of the Merb plugin manager....installing gems
straight from RubyForge.
However, the current implementation in trunk wants to find an install
script and a Rakefile.merb. Many gems would still be useful without
this and could be easily packaged with a Merb app for deployment.
Right now it wil "rescue nil" if no uninstall script is found, but the
others are required.
Is
2007 May 08
2
Extending SuperRedCloth
Fellows of the cloth --
I''m writing code that subclasses RedCloth and emits styled text that
is not HTML. For example, I''m going to be emitting RTF and other
formats from Textile or Markdown.
I''ve got it working quite well with plainclothed RedCloth, but I can''t
seem to override any of the methods in SuperRedCloth. Here''s a sample:
2017 Jul 28
4
R Programming help needed - Returning dataframes + 2 Variables dynamically
c() is used for constructing vectors. Or in other words using the method
c(x,y) provides a vector of length 2 (hopefully). Therefore, you are
pushing a single vector to your function and not two arguments as you want.
It should be Logic_fn(x,y) not Logic_fn(c(x,y)).
Furthermore, i would recommend reading up on how function constructs work.
Two return statements within a function are redundant
2007 Sep 05
2
after_create callback called twice in test env when using fixtures
All,
I''ve been trying to figure out a strange bug in one of my applications
that I think I''ve narrowed down to a problem with rails fixtures. It
seems as though the after_create callback is being run twice when I
save a record. This is only happening a) in the test environment, and
b) when there is a fixture file for that table.
The test below only prints "Doing
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
2007 Sep 24
1
Mosquito TDD Framework Updated
Mosquito, the TDD framework for Camping has been updated (0.1.3).
We''ve tried to keep it backwards compatible, so your apps should
continue to work. But feel free to submit a bug report at RubyForge if
you have any problems.
Changes:
http://rubyforge.org/frs/shownotes.php?group_id=351&release_id=14845
Download:
http://rubyforge.org/projects/mosquito/
Docs:
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
2012 Feb 15
1
Passing date as parameter while retrieving data from database using dbGetQuery
Hi All,
This might be simple question, I need to retrive data for modelling from the
databases. Eveytime date values changes so I countnot fix date value in the
code, it is required to pass as parameter.
When I pass the date as parameter, it throws error.
(ERROR: column "start_dt" does not exist Position: 285)
My script is as below, please guide me where am I going wrong?
All parameters