similar to: Testing: Application controller and helper

Displaying 20 results from an estimated 5000 matches similar to: "Testing: Application controller and helper"

2006 Nov 30
41
TDD killing my joy of Rails
I''ve been working through the book ''Beginning Ruby on Rails E-Commerce'' which is very heavy on Test Driven Development. As in, you have to write tests for scaffolding methods and validations and crap like that. And then they fail. And you KNOW its the test not the method. So you spend 2x the time writing a test that has to be adapted when requirements change. You
2006 Feb 08
5
validates_acceptance_of + functional testing
I had to add a check box indicating that a user accepted certain terms to a page. So, I put in a ''validates_acceptance_of :terms'' line into the appropriate model and added a checkbox to my view. Everything works as expected in my web browser. However, my functional tests still pass and I didn''t add or change anything to them. I was expecting to have to add another
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
2007 Feb 12
18
document "expando" properties broken in Konqueror
I noticed that some of my event handlers and scripts evaluated in ajax responses didn''t work in Konqueror (3.5.5). document.getElementsByClassName is not defined in these contexts. I can work around this, by saving document.getElementsByClassName in a (namespaced) global variable once and reassigning it before each use. Still, this misfeature is annoying and not restricted to this
2006 Nov 27
3
Power User Tipping Point: PHP to Ruby
I have been waiting for a tipping point to start using Ruby applications instead of PHP applications. My criteria include the availability of Ruby and RoR web hosts and Ruby equivalent applications readily available for PHP. I keep finding PHP applications to fill my needs but not Ruby applications or hosts offering Ruby support. For example, I use content management systems which are
2006 Apr 05
11
Managing a Rails project
Can someone point me to some good ideas about managing Rails development - like what would be a good way to document all the models and controllers and methods that might result if several people are prototyping on different parts of a system, and what might be a good structure for pushing back code into SVN as scaffolds are turned into real projects - that sort of thing. I''m
2006 Dec 11
1
assert_redirected_to error
I''m new to TDD in rails, I''m getting this weird error with assert_redirected_to. Here''s my test: def test_friendship_request_accept @request.session[:user] = users(:nathan).id get :accept, { :id => 1 } assert_redirected_to :controller => "/users/profile", :action => "index", :id => users(:nathan).id end When I run this I
2006 Aug 03
8
beginning a statistics application
Hi all, I need to write an application that gets data from a database and plots it on a graph. I am familiar with java and know that I could do it with jfreechart - however I am excited by RoR and would like to write the application with RoR instead. Is it possible to write it in RoR? Chris -- Posted via http://www.ruby-forum.com/.
2007 Jun 18
2
weakness of helper?
Hi , It comes to me that helper has some weaknesses: 1) It is hard to test . No easy way to write test code for it. (or Just i didn''t know?) 2) Not easy to reuse it on other controller/view/model. it looks like to that putting the helper code into a model (a fully helper model , or a mixed model) is good practice. However i agree that some html intensive
2006 Sep 19
18
Open Source UML Tool for Ruby on Rails?
I am new to web development, Ruby on Rails, and UML as well. I was wondering if there were any free tools available for UML design. There is a list of free tools on wikipedia under UML tools, but I don''t understand if I need a tool that supports the ruby language. If anyone uses a free UML tool for designing Ruby on Rails apps, please let me know what you use.
2006 Apr 19
24
Why Ruby on Rails
Our company is mainly made up off application developers but we have a lot of web work coming up so we are deciding which route to take at the moment. We initially identfied ASP.NET 2.0 with the ATLAS AJAX framework because of the RAD features, easy to learn etc. I had read some stuff on ROR and our Boss who is open minded allowed me to create a sample application with ROR. He was impressed
2013 May 21
2
problems with saving plots from loop
Greetings, I cannot find solution for this problem (I was searching on web, but without success): I want to plot dose-response models for one concentration and many responses (lets say 200) and I don?t want to do it manually. So I use loop for this: for (i in mydata[,2:201]){ #first column is concentration pdf(paste("plot_",i,".pdf",sep = ""))
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
2006 Jan 18
5
Ruby and charting
Hi- I need to create simple charts on the fly - I had used JFreeChart in the past with inJ2EE apps. Is there any equivalent here for Ruby. My charting needs are simple: just line charts. Also if anyone has done this, pls let me know how I should go about in doing it. Thanks -- Posted via http://www.ruby-forum.com/.
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:
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