similar to: Problem with test_truth

Displaying 20 results from an estimated 1200 matches similar to: "Problem with test_truth"

2006 Jan 10
2
Default unit tests failing?
I''ve got a strange issue. My default unit tests are failing for two models. I haven''t changed _anything_ in the test. Here''s an example: Output: 1) Error: test_truth(ShippingCostTypeTest): NoMethodError: You have a nil object when you didn''t expect it! You might have expected an instance of Array. The error occured while evaluating nil.find
2005 Dec 23
2
SQLite in-memory
I left ":memory:" in database.yml for testing and the most simple tests in the Agile book do not work (see trace below for test_truth). Since that''s what comes with the distributed database.yml I suppose it''s me doing something wrong. Did someone get SQLite ":memory:" working? How does it grab the schema? -- fxn % rake test_units (in
2006 Apr 25
3
rake test:units fails on Postgresql due to nil
Following the directions in: http://www.xml.com/pub/a/2006/04/19/rest-on-rails.html?page=2 I get through the: rake db:migrate With the tables created properly but then when I run the: rake test:units I get a failure: ActiveRecord::StatementInvalid: RuntimeError: ERROR C23502 Mnull value in column "title" violates not-null constraint FexecMain.c L1750
2005 Dec 22
2
nonstandard postgresql sequence names
I''m working with a legacy postgresql database where the names of tables, columns, etc., do not usually follow Rails conventions. I''ve been able to work around it for the most part, but I ran into this: I have the following test: require File.dirname(__FILE__) + ''/../test_helper'' class SponsorTest < Test::Unit::TestCase self.use_transactional_fixtures =
2005 Dec 30
1
Problems with Testing (Depot) demo app in Agile Rails book
I''ve encountered a perplexing problem whilst following along the demo app in the "Agile Web Development with Rails" book. Any help would be greatly appreciated. Here is a brief time line of my tale of woe:- 0. Been programming (business apps) and designing/building DBs for two decades - but new to both Ruby and Rails (so I apologise in advance if I''ve made some
2008 Dec 17
1
My first rspec reports "undefined method `key?' for #<String:0x46b1df0>"
this my first rspec test, it is very simple ----------------------------------------------------------------------------------------------------------------------------------------- > require File.expand_path(File.dirname(__FILE__) + ''/../spec_helper'') describe Doc do fixtures :docs before(:each) do @doc=docs(:yjn_bjy) end it "should create a new instance
2006 May 11
12
Verifying Good Setup of RoR + PostgreSQL
I''ve been reading the RoR tutorials and wiki help stuff, but I''m stuck. :( I''ve got RoR installed properly and get the "Welcome aboard! You''re riding the rails." I have an "article" controller, "article" model, and both an "article" and "articles" views (one is a remnant, I think, and no longer needed) (the
2007 Jul 12
0
[retry] fixture_references: "Mysql::Error #HY000"? (fwd)
I''m resending this with additional information, as I''ve had no response. I''ve been trying to use the fixture_references plugin, and I seem to be getting lots of: 1) Error: test_truth(DeviceTest): ActiveRecord::StatementInvalid: Mysql::Error: #HY000Field ''description_id'' doesn ''t have a default value: INSERT INTO devices (`id`) VALUES (2)
2006 Oct 26
2
Mocha and SimplyHelpful
Hi, I''m getting a conflict between the Mocha plugin and the Rails SimplyHelpful plugin. For some reason the dom_id method from SimplyHelpful is not being found in my views when the Mocha plugin is installed. The dom_id method if used in the controller works properly. This is the error I get when running the tests: 1) Error: test_truth(HmmControllerTest):
2006 Aug 15
5
Set up a default route
Phlip wrote: > Can I fix it by adding a view called ''inventories''? That worked, because I have a sufficiently late version of MySQL. Next question. What does "Set up a default route" mean? When I read... http://wiki.rubyonrails.com/rails/pages/Routes ...it reminds me of the Apache documentation for mod_rewrite. I hope someone appreciates the candor of my
2007 Feb 03
7
Interesting radio button behavior with "onclick"
Hello: I have radio buttons like this: <% fields_for :goalhist do |g| %> <table> <tr> <td align=left><%= radio_button_tag (''duedate'', 0, checked = false, options = {:onclick => ""}) %> &nbsp;&nbsp;Start now </td> </tr> <tr id="detailed" style="display: none"><td colspan=2>
2007 Feb 16
13
negate the regexp in validates_format_of
Railsters: ActiveRecord''s validation system puts other database systems to shame. However, the newbies might not know how to write a regexp that excludes a match, instead of tests for it. Understand - I''m just asking this question to help them. I have been using Regexps since ''grep'' on Xenix! But the newbies here might not know how to do this:
2004 Dec 09
3
fixture problem, TypeError: nil is not a symbol
When I run rake against Rails 8.5 to test unaltered model tests with yaml fixtures I get the error and stack trace reproduced below for every one of my model objects. Has anyone seen something this before? Any idea what could be going on here? The following ruby-talk thread may or may not be relevant: http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/95301. Thanks much,
2009 Feb 25
5
[Cucumber] pretty html output?
Cucumberists (and RSpec Classic users ;): How can we convert a Cucumber feature file into HTML with syntax highlighting? Not the test-runner output; that''s preprocessed so it does not match the input file... Tx! -- Phlip
2008 Feb 18
5
uh... fixtures?
RSpec-ers: I''m aware this is quite the FAQ. I have probably asked it myself, but I just can''t Google up anything but others asking it. I grabbed the source to Beast, to use as a Rails project uninfluenced by me, or RSpec. Then I installed the CURRENT version of RSpec and rspec_on_rails, and set up a model spec on Post. Here''s the spec_helper.rb lines:
2006 Nov 28
11
New Rails Site: Wordie
My latest stupid web trick, built, with love, in Rails: http://wordie.org Make lists of words. See who else likes the same words. Basically, it''s a dating site. Built on thanksgiving while half-watching football and launched yesterday. In other words, half-baked, but I thought some of you might find it mildly amusing. John ____________________________ John McGrath Squirl: a site for
2009 May 05
9
no sql in the controller guideline
hello. i just checked Chad Fowler''s post "20 Rails Development No-No''s" and one guideline caught my attention. it says: "Nothing that looks at all like SQL should go into a controller, view, or helper." it really came as a surprise to me as Rails itself seems to go against such practice by its AR ''conditions'' option, which most of the times
2007 Apr 19
4
render_to_string in a model ?
I have a batch job that will call script/runner, I would like in this call to create html formated email and save it to the database. This is easy enough in a controller with yournewhost.email = render_to_string :action => "email_newhost_ready", :layout => false But render_to_string is only available in controller action pack, is there a easy way to render_to_string in a Model? Or
2009 Jul 06
8
how to make ZenTest autotest run whenever my tests change
Railsters: Despite Rails being the only Web platform designed for TDD, a lot of its test infrastructure is still "cargo cult" - imitating other test rigs instead of understanding their principles. Most importantly, tests should run instantly. There''s no excuse for breaking this rule, and if you invent a platform that can''t obey it then you are doing something
2009 May 14
6
Generated test files and bad require 'test_helper'
Why do the generated test files have: require ''test_helper'' It cannot obviously find the file because it''s located in a subdirectory. That''s annoying. -- Posted via http://www.ruby-forum.com/.