similar to: testing question

Displaying 20 results from an estimated 11000 matches similar to: "testing question"

2006 May 26
4
Using ''validates_inclusion_of'' to validate foreign key
I seem to be missing something trying to use ''validates_inclusion_of'' to validate a foreign key and was hoping some one could piont out my mistake? The problem seems to be that Order.find_all.collect is not returning an array that contains the order_id, if I replace it with a hardcoded array everything works as expected. The model: class OrderItem < ActiveRecord::Base
2006 Mar 14
5
GROUP BY and SUM
I have orders, order_items, and products. I want to collate several orders so that I can get a SUM of quantities ordered for each product etc. Can I say something like (the below gives an error on :sum, and ignores :group) OrderItem.find(:all, :sum => ''quantity'', :group => ''product_id'', :include => [:order, :product]) I want to get back a
2007 Oct 13
4
Chapter 9
Hello, I''m currently stunk on this issue for few days and I do not know how to get it fixed. The system always raises this error message : order is closed and here is my order.rb: class Order < ActiveRecord::Base include ActiveMerchant::Billing before_validation :set_status attr_protected :id, :customer_ip, :status, :error_message, :updated_at, :created_at attr_accessor
2006 Apr 14
3
Updateform with a has_many relationship ?
Hello all, I would like to be able to update the "amount" of a certain item in me order list. The problem I run into is how to define the text_field element. @order is the current order, which has_many :order_item which in turn belongs_to :order. order_item has a field "amount" which should be modified... What I tried is this below, but I get a undefined method
2006 Apr 20
2
Additional Fields in a Join Table
Hi, I am creating an order management web application, and have run into an issue over join tables. I am reading Agile Web Development and it says that I can put additional fields within my join tables, and they give the example of a date field. I want to know if it is possible to do the following: I have an orders table with the order information as well as an orders_items table and an
2009 Feb 14
2
anova help
Hi all, I am trying to run a two factor anova, but one of the factors is a random factor, now I am also running in SPSS and it seems its dividing by the wrong term to get the appropriate F term. here is my data. In SPSS the F scores about double the ones in R, how can I specify one of my factors as a random factor or change it to where it does the right model fitting? I am using the lm command
2006 Mar 28
2
Problem with generating a scaffold with an Oracle DB
Hi all, I have confgured my oracle application with the Oracle Express Production release database. This all is configured well and tested(I can see that he founds the database). However, when I generate a scaffold application there is no view for the CRUD functions created for the application. Below is listed what is generated for me for a Products table: E:\workdir\ruby\depot>ruby
2006 Dec 02
0
Fwd: Re: Mocha and ActiveRecord
---------- Forwarded message ---------- From: J. B. Rainsberger <jbrains762 at gmail.com> Date: 02-Dec-2006 02:48 Subject: Re: Mocha and ActiveRecord To: ruby-talk ML <ruby-talk at ruby-lang.org> James Mead wrote: > On 28/11/06, J. B. Rainsberger <jbrains762 at gmail.com> wrote: >> >> Suppose I have an Order, which has_many OrderItems. Suppose I want to >>
2007 Mar 24
0
Using spec fixtures with integration tests
Hi all, How can I use spec fixtures with rails integration tests ? I''ve tried adding {{ fixtures "../../spec/fixtures/myfixture" }} to the integration test but the fixtures are not loaded when I run the rake task. Rails doesn''t load symlinked fixtures either so I copied the files from spec/fixtures for the time being. Not very DRY. Any ideas ? Keith
2006 Feb 20
0
YAML and has many associations
Hi, I have the following: order = YAML::load(order_yaml) The YAML contains order_items too, and my order model has a has_many to order_items. When I do order.order_items, I don''t want Rails to go the db to get the order_items, but use the order_items already contained in the object created from the YAML. How would I do this? Thanks Joerg -- Posted via
2006 Jun 15
6
Sqlite3 test fails in Rails app
Greetings: I am using Sqlite3 database with my Rails app. When I try and run "rake tests" for the app it always fails with the error: ** Invoke default (first_time) ** Invoke test (first_time) ** Execute test ** Invoke test:units (first_time) ** Invoke db:test:prepare (first_time) ** Invoke environment (first_time) ** Execute environment ** Execute db:test:prepare ** Invoke
2006 Jul 11
0
using acts_as_list storing the information in a session
Hi, I have an order model that i am storing in a session, that is not currently in the database. I am updating the page using ajax, and I do not want to store the order in the database untill it is completely filled out. I have order_items that I am adding to the order, and I have used the acts_as_list within the order_item model. My problem comes when i try and rearrange the order_items
2006 Apr 12
2
unit testing with model inheritence
Having jotted down some models, with some inheritence I tried to run some unit tests. After waiting for rake test_units to run I got a rake of errors (if you''ll forgive the play on words). The errors were to do with unknown tables in the tear down stage. The unknown tables corresponded to sub-types where single table inheritence was used. In other words, these tables *shouldn''t*
2006 Jun 01
9
@model.errors.empty? => true; @model.valid? => false
Hi, So, how can the situation described in the subject come to be? In other words, what could be invalidating the model, yet not generating an error? thanks, jh ps. here''s the breakpoint session paste: irb(#<#<Class:0xb72eec00>:0xb72eeb10>):003:0> @project.errors.empty? => true irb(#<#<Class:0xb72eec00>:0xb72eeb10>):004:0> @project.valid? => false
2018 Nov 30
4
DMARC policies
Same problem here. I clicked the unsubscribed button, but didnt receive the email. Regards Jan On 30. 11. 18 10:50, glide3 at gmail.com wrote: > Same problem here. > > https://dovecot.org/mailman/options/dovecot-news > > Sadly the remind password button / unsubscribe email button click and claim > to send me a email but they don't. > > Assume its due a high
2018 Feb 13
2
Setting up sieve with spam learning
Cribbing from the dovecot site I recently added the following lines to my dovecot.conf: managesieve_notify_capability = mailto managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date index ihave duplicate mime foreverypart extracttext imapsieve
2011 Oct 16
1
Ignoring certain files?
Hey guys, Is there any way I can get rspec to ignore all files in spec/fixtures when it does a recursive search for all spec/**/*_spec.rb files? The problem I''m facing is that the fixtures for my code are project structures on disk, so I thought I''d make a spec/fixtures with a bunch of different project structures. That works, except obviously those can contain _spec.rb
2006 Aug 11
5
Unit tests - NilClass problem
Hi! Yesterday I started to write my unit tests for the fist time using rails. I''m using this method: http://blog.codahale.com/2005/12/23/a-rails-howto-simplify-your-unit-tests/ My customer_test.rb looks like this: require File.dirname(__FILE__) + ''/../test_helper'' class CustomerTest < Test::Unit::TestCase fixtures :customers # Replace this with your real
2004 Aug 18
4
LTP system call test all pass!
After fix bug 130 and 131, and some LTP bugs. ocfs2 can now pass all LTP filesystem related system call testcases. detail result see attach. ------------------- Intel China Software Lab. iNet: 8-752-1243 8621-52574545-1243(O) xfling@users.sourceforge.net Opinions are my own and don't represent those of my employer -------------- next part -------------- A non-text attachment was
2015 Oct 13
8
Edit icecast.xml while server running
Good morning, On Mon, 2015-10-12 at 07:16 -0700, Jack Elliott 541 848 7021 wrote: > When running Icecast server on a Windows machine, I find that I can > edit icecast.xml while Icecast is running, but must stop and restart > Icecast for the changes to be recognized. At least right away, anway. > It's possible that Icecast will eventually get around to accepting the > changes