similar to: Generated test files and bad require 'test_helper'

Displaying 20 results from an estimated 10000 matches similar to: "Generated test files and bad require 'test_helper'"

2007 Apr 04
2
unit tests?
Ezra et al: I have this problem: http://rubyforge.org/pipermail/backgroundrb-devel/2006-December/000578.html Any progress on it? Or are unit tests simply impossible for now? -- Phlip http://c2.com/cgi/wiki?ZeekLand <-- NOT a blog!!
2006 Apr 16
7
Problem running unit tests
I am running Rails 1.1.2 with Ruby 1.82-15. My database is Postgresql. I haven''t had any problems generating models, migrations, using scaffolds, and generally building and using my application, but I haven''t been able to get testing to work. I initially just ignored the problem and kept developing, but would like to add proper testing from here on out. Currently when I type
2006 Jun 16
5
BackgrounDRb / Testing Error: uninitialized constant BackgrounDRb
I''m digging into BackgrounDRb and having some problems testing a worker class. The following line in my test (created from script/generate worker Test) throws an error: worker = TestWorker.new(:test_string => "testing...") Error: /activesupport/lib/active_support/dependencies.rb:123:in `const_missing'': uninitialized constant BackgrounDRb (NameError) from
2007 Jan 23
2
SslRequirements plugin and mocha
Hi. I''m loving mocha but have ran into a problem with using the mocha plugin with a project that has the SslRequirement plugin. It seems there is some conflict between the two? Any ideas? $ ruby test/functional/calendar_controller_test.rb /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/dependencies.rb:478:in `const_missing'': uninitialized constant
2016 Jun 07
3
[PATCH 1/2] ruby: Print exceptions thrown by event callbacks.
--- generator/ruby.ml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/generator/ruby.ml b/generator/ruby.ml index 97ccfdc..0f71ccc 100644 --- a/generator/ruby.ml +++ b/generator/ruby.ml @@ -404,15 +404,17 @@ event_callback_wrapper_wrapper (VALUE argvv) return Qnil; } +/* Callbacks aren't supposed to throw exceptions. We just print the + * exception on
2012 Jul 16
1
After moving from Ruby 1.8.7 to 1.9.3 - test/unit/error (LoadError)
People, For my old library app I did with Rails 2.1.1, if I use Fedora 16/Ruby 1.8.6, everything is OK. If I copy the app to a Fedora 17/Ruby 1.9.3 setup and reinstall all the old Gems and run: ./script/server I get: /usr/share/rubygems/rubygems/custom_require.rb:55:in `require'': cannot load such file -- test/unit/error (LoadError) from
2006 Aug 07
9
problems with ActionMailer
Hi all, I''m trying to create a worker to send a mail to all the users in my db. Right now I''m doing the tests, this is the code in my worker (Masivo is the ActionMailer subclass): def do_work(args) @progress = 0 @logger.info("MAILER: starting job") records = Record.find(:all) total = records.size records.each_with_index do |record, idx|
2005 Jul 22
3
testing application_helper.rb
I am trying to run some functional (or are they unit?) tests on my application_helper.rb. So far, I''ve not had any success in being able to call the methods defined in application_helper.rb. Here is my app/test/functional/helpers.rb require File.dirname(__FILE__) + ''/../test_helper'' require File.dirname(__FILE__) +
2006 Feb 01
3
Testing components
I''m using template components to modularize an application I''m working on and am really happy with the way it''s going. Unfortunately, all my attempts at writing functional tests for them fail. Trying to duplicate my normal controller tests I have: require File.dirname(__FILE__) + ''/../test_helper'' require File.dirname(__FILE__) +
2008 Oct 06
10
Uninitialized constant Spec:Story
Hi, I''m fairly new to Rails and v. new to RSpec. Think it looks pretty useful and so I''m trying it out for the first time. I have installed the rspec-rails gem and created a simple plain text my_story file and my_story.rb file along the lines described here - http://www.tomtenthij.co.uk/2008/1/25/rspec-plain-text-story-runner-on-a-fresh-rails-app. When I run
2009 May 10
4
How to generate UML diagrams from existing ruby code?
Hi, thanks for reading. Till now, I''ve used railroad to visualize my models. But as far as I can see, there''s no possibility to add information about the model class methods. Methods are only added to a diagram, if you visualize your controllers. Is there a way to change this behavior? I''ve looked out for something else and found ''ruby-uml'', seems to
2007 May 30
4
aaf and dynamic attrs: a bug?
Hi! I faced some issue while using it for dynamic attrs indexing/search. Maybe I made something wrong. Here is test method. Everything works just fine until last line http://pastie.caboo.se/66274 . Tested on both stable and trunk of aaf and ferret 0.11.4. the short version of code below: Contact.acts_as_ferret :fields => [ :first_name ] assert
2006 Dec 27
2
DB-less rspec_on_rails
Hi! I''m still struggling with RSpec to get it working with a Rails application, that does not use a database. I removed all the db:* dependencies from the RSpec targets, but it still wants to connect to a database. Any ideas? bye, Tobias ** Execute spec:models /usr/bin/ruby1.8 -I"/var/lib/gems/1.8/gems/rspec-0.7.5/lib"
2011 May 10
7
Webrick script/server file does not exist
Hello all, I worked fairly enough with PHP and MySQL, but am very new to Ruby. I have Windows machine with Apache and MySQL installed previously. Both Apache and MySql were stopped while installing Ruby. I tried several ways to install Ruby 1.8.7 and one-step installer. I can use Ruby with netbeans 6.0.1 with its own Ruby or with the one I installed now. The problem starts when I try to create
2006 Jul 25
1
Managing backtrace
I''m writing a method_missing handler to "automagically" create assertions from predicate functions. So, for example, one use might be: assert_not_include ''joes@shmoe.com'', response.to -or- assert_include ''info@mydomain.com'', response.from The code is working properly, but when I trigger an assert, the backtrace shows something like:
2008 Nov 04
9
RSpec and PostgreSQL not playing nicely together
Here is a very simple spec: -- require File.expand_path(File.dirname(__FILE__) + ''/../spec_helper'') describe Product, "The Product model" do describe "When a new blank product object gets created" do before(:each) do @product = Product.new end it "should not be valid" do @product.should_not be_valid
2007 Jul 30
6
Object.stubs doesn''t seem to work.
Hi I''m using Mocha 0.5.3 and I want to stub out a call to Time.now, just like the example in the post http://blog.floehopper.org/articles/2007/06/08/mocha-0-5-released However, trying it in irb gets me the following error: >> require ''mocha'' => true >> Time.stubs(:now).returns(Time.parse(''Thu Feb 01 00:00:00 UTC 2007'')) NoMethodError:
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
2009 Feb 01
8
undefined method `inherit'' for Merb::Test::ExampleGroup
RSpeckers: I''m trying to install this into a Merb-generated RSpec rig: http://code.jeremyevans.net/doc/fixture_dependencies/ It requires inserting their test case into RSpec. This is the documented way to do it: describe ''Post'' do inherit FixtureDependencies::SequelTestCase And that leads to the syntax error in the subject line. (No stack trace is available
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