Displaying 20 results from an estimated 11000 matches similar to: "uninitialized constant Rails in Tests only"
2006 Jan 08
0
uninitialized constant Test
I recently upgraded to Rails 1.0 and started a new project. I''ve
started writing some tests, but when I run rake, I just get the
following...
Amnesia:~/Development/Rails/pog shad$ rake
(in /Users/shad/Development/Rails/pog)
/usr/bin/ruby -Ilib:test
"/usr/lib/ruby/gems/1.8/gems/rake-0.6.2/lib/rake/rake_test_loader.rb"
"test/unit/pog_test.rb"
2006 Jan 30
0
const_missing: uninitialized constant Test when running unit tests
I have a set of tests that run without issue on one machine. On another
machine when running the same tests we get:
/usr/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/dependencies.rb:200:in
`const_missing'': uninitialized constant Test (NameError)
from ./test/unit/../test_helper.rb:5
from test/unit/entity_test.rb:1:in `require''
from
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 Dec 24
1
Uninitialized constant in integration test
I am seeing weird issues when trying to create integration tests. Here
is a very simple example of something that is failing. The
assert_redirected_to, and other methods, fail with this or similar
exceptions.
I have tried requiring both ''application'' and ''listings_controller'', but
neither solves this problem, although the exception changes.
Anybody know
2006 Feb 02
4
uninitialized constant Test (NameError)
I have three Rails apps on my laptop.
Two can runs tests just fine.
The third generates this error when I try to run any tests:
> /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/
> active_support/dependencies.rb:200:in `const_missing'':
> uninitialized constant Test (NameError)
> from ./test/unit/../test_helper.rb:5
> from
2012 May 01
1
uninitialized constant LoginController in Ruby
This is my environment.rb
# Load the rails application
require File.expand_path(''../application'', __FILE__)
# Initialize the rails application
Qstack::Application.initialize!
require ''koala''
This is my application_controller.rb
class ApplicationController < ActionController::Base
# protect_from_forgery
before_filter :parse_facebook_cookies
def
2007 Nov 02
0
DATE_FORMATS and functional tests
I have the following in my environments.rb file:
my_formats = { :msc => ''%d %b %Y %I:%M %p'', :msc_short => ''%d %b %Y'' }
ActiveSupport::CoreExtensions::Time::Conversions::DATE_FORMATS.merge!
(my_formats)
ActiveSupport::CoreExtensions::Date::Conversions::DATE_FORMATS.merge!
(my_formats)
With this, things like
2006 Mar 01
1
maddening intermittent failures in unit tests with "working" code
Hi all,
This testing problem has been a sink for time today, and is still unresolved.
Basically I have some unit tests that test simple functions (example below)
that depend on join operations in a habtm relationship, and I suspect I am
getting "false" failures, i.e ones that do not logically make any sense. I
need fresh sets of eyes to take a look and see if I''m mising
2008 Dec 03
5
How to test a plugin
Guys,
I''ve created a plugin, i wanna put my automated test there.
However, I got bad file descriptor error when i run the test like normal
unit test file:
"ruby plugins/acts_as_fox/test/acts_as_fox_test.rb"
How to test a plugin?
Also, is it right to say that I should only put my unit tests (but not
functional test for example) for the plugin in the plugin test folder?
2009 Dec 10
1
ActionMail Charset for email body
Hi Guys,
I succeeded in sending email with content-type big5. However, the
content of the email is still utf-8!
I''ve tried to call the
t(:my_sentence).encode(''big5'')
or my content, but there is
"invalid byte sequence in UTF-8"
errors in a lot of places starting from actionmailer/lib/utils.rb
(text.to_s.gsub(/\r\n?/, "\n"))
and it stop me from
2011 Jan 26
0
[Rails 2.3.10] uninitialized constant ActionController::AbstractResponse
I am testing some code under 2.3.10 ( w ruby 1.8.7) and when trying
only to start the console , I get the error :
=====
/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:440:in
`load_missing_constant'':NameError: uninitialized constant
ActionController::AbstractResponse
ruby-1.8.7-p330 :001 >
I cannot see what happen in any log ... where or how can i get some
info on the
2009 Sep 09
3
[Rspec] Using Mocha results in uninitialized constant, using a 'fix' breaks RSpec output
After installation of Mocha (0.9.7), running "script/spec spec"
results in a "`const_missing'': uninitialized constant
Test::Unit::TestResult::TestResultFailureSupport (NameError)" error.
(As shown here; http://codepad.org/mTqztjwt )
I''m running Ruby 1.8.6 with Rails 2.3.4 on Windows, rspec (-rails)
1.2.8 (1.2.7.1), Test::Unit 2.0.3
As suggested roughly on
2009 May 12
0
`load_missing_constant': uninitialized constant Rails::Generator (NameError)
Hello,
I''m probably missing something pretty basic here as a rails newbie but
I''m trying to write a plugin and I am trying to get my generator to work.
I am trying to call the manifest method in my
vendor/plugins/media_module/generators/media_module_generator.rb from my
vendor/plugins/media_module/init.rb.
here''s the code in vendor/plugins/media_module/init.rb:
2006 Jun 16
0
running rake after install fails (fixed)
Hi all (and Ezra),
I couldn''t get my rake tasks to work after installing the plugin -- until I
added a line at top of to test_helper.rb:
require File.expand_path(File.dirname(__FILE__) +
"/../script/backgroundrb/lib/backgroundrb.rb")
Is this in the docs?
--
Charles Brian Quinn
www.seebq.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
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
2009 Mar 22
1
Upgrading 2.2 to 2.3: console broken, "uninitialized constant Module::ActiveSupport"
Upgrading a Rails app from 2.2 to 2.3.2 (via 2.3.0). Got things
working in the browser, but script/console seems messed up in both
2.3.0 and 2.3.2:
$ script/console
Loading development environment (Rails 2.3.2)
/Library/Ruby/Gems/1.8/gems/rails-2.3.2/lib/initializer.rb:56:in
`env'':NameError: uninitialized constant Module::ActiveSupport
2008 Apr 15
2
environment.rb uninitialized constant when starting console
I have the following code in environment.rb:
require File.join(File.dirname(__FILE__), ''boot'')
raw_config = File.read(RAILS_ROOT + "/config/config.yml")
APP_CONFIG = YAML.load(raw_config)[RAILS_ENV]
This works fine when running the server, but if I try and start a
console I get:
Loading development environment.
2006 Dec 06
0
Testing your workers
This has been asked before, never well attended perhaps.
Any thoughts on testing your workers?
Current implementation is broken. An empty test case like this:
require File.dirname(__FILE__) + ''/../test_helper''
require "#{RAILS_ROOT}/lib/workers/market_summary_worker"
require "#{RAILS_ROOT}/vendor/plugins/backgroundrb/lib/backgroundrb.rb"
require
2006 May 02
3
''NameError: uninitialized constant <MyEntity>'' in console
When I create a new model entity, and try to access it from the Rails
console I get the error:
>> b = Bar.new(:name => ''Some Bar'')
NameError: uninitialized constant Bar
from (irb):1
from :0
(My model class is called Bar, and is in file app/models/bar.rb)
So, I try to load the model class file, and I run into a more frigtening
error:
>> load
2016 Jun 07
0
[PATCH 2/2] ruby: tests: Give each test class and method a unique name.
'tc_410_close_event.rb' was not being run. You could prove this by
simply inserting "exit 1" into that test.
The reason is unclear, but by renaming every class and method in the
tests to be unique, this ensures the tests are run.
---
ruby/t/tc_010_load.rb | 4 ++--
ruby/t/tc_020_create.rb | 4 ++--
ruby/t/tc_030_create_flags.rb | 4 ++--