search for: foo_test

Displaying 12 results from an estimated 12 matches for "foo_test".

2008 Dec 29
1
[LLVMdev] [Patch] Adding unit tests to LLVM
...test collection. If the llvm tests all use the same main(), and the main() is not repeated in the individual unittest files, then it is trivial to have a) one massive binary that contains all the tests (fast to build & run all unittests pre-checkin) and separate binaries per .cpp (i.e. foo.cc, foo_test.cc, and foo_test binary) for fast iterating which would only be built and run when explicitly called from the makefile (i.e. they would not be run by the build-all-unittest make target). On the other hand, if separate binaries are built, then a make unittest target could parallelize trivially by a...
2007 Jun 11
12
Mocking system/`
This drives me insane on a regular basis. How does one mock system(''blah'') or `blah` ? Adding expectations on Kernel doesn''t do it. Adding expectations on Object just makes me sad: Object.any_instance.expects(:system).with(''ls'') # => #<Mock:0x12b584e>.system(''ls'') - expected calls: 0, actual calls: 1 And this really
2008 Dec 29
0
[LLVMdev] [Patch] Adding unit tests to LLVM
2008/12/29 Talin <viridia at gmail.com> > Do the existing tests use a wildcard rule to gather all test sources? We > would need to insure that the wildcard rule for the unit tests and the large > tests are mutually exclusive. > By "large tests", I assume you mean the .ll tests? Those are one-file-per-test. Also, if you use Chris' suggestion on directories, it
2007 Dec 24
1
Uninitialized constant in integration test
...' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.1/lib/action_controller/assertions.rb:54:in `clean_backtrace'' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.1/lib/action_controller/assertions/response_assertions.rb:54:in `assert_redirected_to'' test/integration/foo_test.rb:6:in `test_redirect'' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.1/lib/action_controller/integration.rb:532:in `run'' -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed t...
2006 Mar 07
3
STI and unit testing
...new.say_hi 32 33 # debug 34 puts class_to_test 35 # end 36 end 37 38 end 39 40 # test case for model Bar, saved in bar_test.rb 41 #require File.dirname(__FILE__) + ''/../test_helper'' 42 43 require File.dirname(__FILE__) + ''/foo_test'' 44 45 class BarTest < FooTest 46 47 def class_to_test 48 Bar 49 end 50 51 def test_say_hello 52 assert_equal "hello", class_to_test.new.say_hello 53 end 54 55 endsql:CREATE TABLE `foos` ( `id` mediumint(9) NOT NULL auto_in...
2006 Jun 22
2
rails on Oracle 10g - missing controller ?
...fold Foo Admin exists app/controllers/ exists app/helpers/ create app/views/admin exists test/functional/ dependency model exists app/models/ exists test/unit/ exists test/fixtures/ create app/models/foo.rb create test/unit/foo_test.rb create test/fixtures/foos.yml The DDL is CREATE TABLE "foos"( "id" numeric(10) PRIMARY KEY, "myText" varchar(10), "myInt" int ) Dennis Byrne -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath....
2008 Oct 08
9
Plugins and the test environment
Hi guys. I''m writing a plugin for use in the test environment. However, when I run ``rake test'''' or ``rake spec'''', RAILS_ENV is set to "development" when my plugin''s init.rb is run. How do you configure a plugin to load require a file in the test environment? Thanks, Nick --~--~---------~--~----~------------~-------~--~----~ You
2008 Dec 29
3
[LLVMdev] [Patch] Adding unit tests to LLVM
Do the existing tests use a wildcard rule to gather all test sources? We would need to insure that the wildcard rule for the unit tests and the large tests are mutually exclusive. Also, will the unit tests be one executable or many? They will probably compile/run faster if there is a smaller number of executables. On Mon, Dec 29, 2008 at 1:43 PM, Misha Brukman <brukman at gmail.com> wrote:
2010 Jun 02
0
Multiple threads writing to the same Starling queue doesn't work?
...can''t find a clear answer to this: is it possible/correct to have several threads write to the same Starling queue at the "same time"? It doesn''t seem reliable according to my tests - but maybe I am doing something wrong. If I do: def test_starling FooWorker.asynch_foo_test(:my_id => ''foo'') temp = [] for i in 1..1000 temp << Thread.new(i) {|random_value| do_stuff(random_value)} end temp.each do |t| t.join end end def do_stuff(lvalue) starling = Starling.new(''localhost:22122'') starling.set(''f...
2006 May 16
2
Dynamically choosing schema using one Model
Hi all, is there a way in RoR to dynamically set the table to which the Model must refer to? I''d like to create a sorta "dispatcher" that chooses the table for the Model based on an HTTP/GET var. To put it in another way my Model would be fed with data coming from different tables based on this var passed from the querystring. Thanks, Lorenzo -- Posted via
2006 May 24
12
Analog to ruby script/generate for removing generated stuff?
All, If I do ruby script/generate model blah, is there an easy way for me to remove all of that stuff that got generated? Something like: ruby script/remove model blah? If it doesn''t exist, is it coming? Thanks, Wes -- Posted via http://www.ruby-forum.com/.
2009 Feb 21
10
Problem with test_truth
hello all, i have a problem with test_truth. require ''test_helper'' class MyDataTest < ActiveSupport::TestCase def test_truth assert true end end this should ok without failures or errors. but it failure: 1) Error: test_truth(MyDataTest): ActiveRecord::StatementInvalid: Mysql::Error: Table ''alldataserver_test.members'' doesn''t exist: DELETE