Displaying 20 results from an estimated 10000 matches similar to: "unit tests vs database state"
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!!
2007 Apr 06
0
Data changes in backgroundrb task don''t show up in Rails
BackgrounDRbers:
We pass a data batch to a background task for processing. When it
finishes, our GUI updates correctly (using the results hash). But the
data records don''t appear in the Rails connection to the database.
Our stack is the HEAD BackgrounDRb, Rails 1.1.6, MySQL, and Apache/mongrel.
As soon as I whack the background process with script/backgroundrb
stop, the data records
2006 Nov 07
0
Wiki -> RSpec -> Watir
Rubies & Acceptance Testers:
For those of you not doing acceptance tests yet, I have a very slick test
rig to show off. I haven''t demo-ized it yet, so please accept these diverse
audiovisual displays as if they were a united whole!
We start with MiniRubyWiki, at this demo:
http://www.zeroplayer.com/cgi-bin/wiki?TestFlea
Click on any of the green bars.
Now imagine if the left
2007 Apr 04
0
what version of BackgrounDRb do I have?
How to detect that from the files?
--
Phlip
http://c2.com/cgi/wiki?ZeekLand <-- NOT a blog!!
2006 Nov 04
2
how to use LabellingFormBuilder
Railsers:
As usual for a product written very rapidly, most of its documentation
assumes some other documentation told you something critical.
For example, the file form_helper.rb tempts me with this documentation:
# <% form_for :person, @person, :url => { :action => "update" },
:builder => LabellingFormBuilder do |f| %>
That''s beautiful. Now what do I
2006 Oct 30
1
domain language?
RSpeckers:
I went with RSpec instead of Systir because I downloaded and installed
the former first.
(I know that''s not exactly a ringing endorsement! ;-)
I want to compete with FIT and Fitnesse, like this:
http://www.zeroplayer.com/cgi-bin/wiki?TestFlea#tropism
(Click on a Green Bar to distend one test case.)
I want a domain-specific language in the parchment-colored area on the
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
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
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:
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 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
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
2006 Nov 21
1
RXML vs form_tag etc
Railsers:
The documentation for *.rhtml views invariably mentions *.rxml views.
They sound like a Good Thing, because some of my generating code mixes
Ruby and HTML so densely that the code is full of %><% markers.
Dropping down to only one language would be a blessing.
However, this documentation invariably avoids mentioning one tiny,
insignificant detail:
How do you inject raw HTML
2007 Feb 04
1
dispatch.cgi -> Anonymous modules have no name
I upgraded to Rails 1.2.1 and deployed to my ISP, who has 1.2.1 ready
and waiting.
The site disappeared into an HTTP 500 error.
So I get into the site, run public/dispatch.cgi or dispatch.rb, and get this:
# ./dispatch.rb
Status: 400 Bad Request
/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/dependencies.rb:405:in
`to_constant_name'': Anonymous modules have no
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:
2006 Nov 17
1
SQLite3 put a parse error in my schema.rb for timestamps
Railsers:
I switched from MySQL to Sqlite3 for Test-Driven Development. It meant
the difference between
(Long term, I want to understand the db:migrate system well enough
that I can run a long test, occassionally, that migrates everything to
MySQL and retests it there. That will prevent nasty surprises at
deployment time. But that''s not the current question!)
Because I don''t
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:
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 => ""}) %>
Start now
</td>
</tr>
<tr id="detailed" style="display: none"><td colspan=2>
2007 Feb 13
5
default database schema and relationships
hi everyone..
i''m a high school teacher who wrote a webapp in PHP and MySQL for my
curriculum.. i use it to keep attendance, take notes per student or
class and keep track of activities. i would like to soup it up and
have read both the pickax and version 2 of agile web dev...
now i''m starting to work and i''d like to rename columns and
relationships in the database so
2006 Nov 28
2
collection_select and selected_value
Hi,
I am using collection_select to build a drop down list. I would like
to have the current value selected. How can I do that?
My current code is straight from the example in Pragmatic Programmers
book [2nd ed, p480] copying here for reference.
<%=
@users = User.find(:all, :order => "name" )
form.collection_select(:name, @users, :id, :name)
%>
I went through the api docs