Displaying 9 results from an estimated 9 matches for "testprocess".
Did you mean:
test_process
2006 Jun 16
4
Unit test and get request with a URL
I''m tyring to write a unit test that uses a get() method to simulate a
get request in my functional test. However, get wants an action, and I
have a URL. I''m trying to redirect to a URL the user tried to hit
before logging in. After they login I want to go back to the URL they
originally tried.
I can''t find the get() method code in the help or otherwise. I
2012 Jun 08
1
[Rails 3.2.5] Rails: unit test fixture_path : fixture_file_upload cannot find the file ...
I am trying to perform a test unit, using FactoryGirl
include ActionDispatch::TestProcess
FactoryGirl.define do
factory :article do
.......
photo { fixture_file_upload ''/files/test.jpg'', ''image/jpg'' }
end
end
IN mt test_helper.rb I defined the fixture_path
def fixture_path
File.dirname(__FILE__) + "/fixtures/" # "...
2006 May 09
1
Rails freeze, weird error
.../usr/lib/ruby/1.8/test/unit/assertions.rb:265: warning: already
initialized constant UncaughtThrow
./script/../config/../config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:100:in
`const_missing'':NameError: uninitialized constant
ActionController::TestProcess
>> Rails::VERSION::STRING
=> "1.0.0"
>> Loaded suite irb
Started
Finished in 0.0 seconds.
0 tests, 0 assertions, 0 failures, 0 errors
/usr/lib/ruby/1.8/irb.rb:76:in `throw'': uncaught throw `IRB_EXIT'' (NameError)
from /usr/lib/ruby/1.8/irb.rb:76:i...
2006 Aug 11
1
Calling a Controller method from the command line
Hi All,
I need to run some reports via cron. I know I can use runner and call
a method in a model class. But I''d really like to use templates and
IMO this kind of logic belongs in a controller anyways.
These are periodic reports so I don''t need nor want to leave a server
running all the time, so getting the data via curl/wget isn''t really
an option.
What I really
2008 Jun 12
1
Which "get" is being used in Controller spec
Hi,
I''m a bit puzzled with "get" in controller specs. When I write,
it "should render index template" do
get :index
response.should render_template(:index)
end
Which "get" method is being used? I checked RDoc of RSpec and RSpec on
Rails, but didn''t find "get".
In Rails RDoc, I found the following "get"s.
get
2006 May 31
0
Help with xhr request in integration tests
Hello,
The documentation at api.rubyonrails.com for
ActionController::TestProcess#xhr or xml_http_reponse gives method as
the first parameter and action as the second parameter folled by the
parameters hash, etc. But ActionController::Integration::Session#xhr
has a path, followed by the parametes hash, and apparently no alias
for xhr. Of course, the documentation in the AWDwR b...
2014 Feb 18
0
How to Test Multimodel Paperclip attachments?
....create!(:upload) }` as well as using
the `fixture_file_upload` directly on the Car's uploads attribute. Also
I read about Associations,but I wasn't sure how that work.
For the upload factory I've done how you would test an individual
attachment
Uploads.rb
include ActionDispatch::TestProcess
FactoryGirl.define do
factory :upload do
upload { fixture_file_upload(Rails.root.join('spec', 'fixtures',
'support', 'test.jpg'), 'image/jpeg') }
end
end
--
Posted via http://www.ruby-forum.com/.
--
You received this message b...
2007 Feb 08
3
testing ajax responder actions
I have an Ajax responder method which uses respond_to to make sure it
only works with Ajax. I''m having trouble figuring out how to call this
action successfully. I''m using Rails 1.2.x. Any thoughts?
--
Cheers,
Kevin Williams
http://www.almostserio.us/
"Any sufficiently advanced technology is indistinguishable from
Magic." - Arthur C. Clarke
2007 Dec 06
10
Feedback on RC2
I tried to upgrade my existing application to RC2 last night. Like many, I
use this mostly for running scheduled tasks. For the moment, I''ve abandoned
the effort, but am looking forward to being able to use this. Feedback
below:
First, the reason I was looking forward to this upgrade was to use the
threaded scheduler. I have an application with long-running tasks. I found
that