Displaying 20 results from an estimated 5000 matches similar to: "Ruby on Rails as rapid prototyping tool"
2006 Jul 24
3
Creating performance test fixtures from development db? How?
Hi all!
I''m looking into the testing chapter of Agile Web Development With Rails
(2nd ed.).
I want to performance test my app, but I''m too lazy to write fixtures for
performance test.
I''d rather use the data from my development db (because the data is so close
to the production data).
How do I get the data into the test db without writing fixtures?
Could you please
2006 Mar 29
2
delete_all not resetting auto incement in database
Hey
I''m writing a simple admin interface thats reading user data (skills)
from a comma separated file.
To clear the database before inserting new skills, I use
Skill.delete_all
Then I insert the new values I read from a file. Everything goes well
up to the point where I see that auto-generated ID''s are not starting
from 1. They start off at 840 (responding to the number of
2006 Aug 23
11
i18n friendly, plugable Rails Core
In my work with a simple localization plugin, i''m running into a lot of
places in the Rails core, where text and other localization specific
information is hardcoded.
I''ve included some examples in the bottom of this post.
It''s hard for an outsider to know, if the hardcoded values are a result
of inconsistency in code, or "by design". I hope that we can have
2006 Apr 17
1
Autocompleter to read value from hidden field
I have an autocomplete field with road names (looking up in a database with
approx. 100,000 road names).
To limit the number of roads, i want an extra input field where to put
postal code.
I''m currently using <%= text_field_with_auto_complete %> for the field.
What is the best way in Rails to intercept the Ajax call and send the value
of the postal_code field?
(I guess I could do
2007 Nov 27
13
Mongrel install crash on win32
Something suddenly went wrong in my ruby install.
When installing Mongrel on my Windows XP laptop, it incorrectly tries to
build it as a native extension. I don''t even get the selection where I
can choose to install a compiled version.
I would appreciate any help/links or similar, as I frankly don''t
understand what''s going on and why I dont get the usual selection box.
2006 Jun 12
2
Ruby on Rails Copenhagen Meetup
Hi Railers
If you are in the Copenhagen area on the 29th of this month (that''s a
Thursday) Jesper and I would be glad to see you at Caf? Selina in the
central Copenhagen for the first of many Ruby on Rails meetups.
We start at 20:30 hours and have of cause arranged for free beer and
complementary WiFi.
Our goal is to create an inspiring atmosphere where railers (new and
old) can
2007 Oct 31
16
Am I missing something with Heckle?
Hi
I can''t get heckle working. In fact, I''ve built an example so simple
that it either shows a bug, or I am being really, REALLY stupid.
Heckle does not appear to support RSpec directly, so I''m trying to use
spec --heckle (RSpec trunk as of 10 mins ago, Heckle 1.4.1). I''ve
constructed this pair of sample files:
18> ~/Desktop/heckle_test % cat
2007 Oct 21
10
Preferred mock framework
Hi
In light of the fact that RSpec mocks are going into maintenance mode
in the near future, I was wondering what everyone was switching to.
I liked the look of FlexMock most, so gave that a shot. However,
there''s a few things that don''t work well with RSpec due to the
traditional differences in the way Test::Unit cases are written vs
RSpec specs. (One spec per
2007 Jun 14
4
Can''t run RSpec files in TextMate
Hi
Not sure if this is the place to ask this or not. I''ve upgraded to
RSpec 1.0.5, installed the latest TextMate bundle, but whenever I do
"Run Behaviour Descriptions in selected files/directories" I get this:
/Users/ashleymoran/Library/Application Support/TextMate/Pristine Copy/
Bundles/RSpec.tmbundle/Support/lib/spec_mate.rb:18:in `run_files'':
private method
2007 Jun 27
2
Controller specs not shareable?
Hi
I just wondered if there was a reason why Rails controller specs are
not shareable? eg
describe "All XHR POSTs to /gap/calculate_quote", :shared => true do
controller_name :gap
# ...
end
describe "XHR POST /gap/calculate_quote with valid details" do
it_should_behave_like "All XHR POSTs to /gap/calculate_quote"
# ...
end
blows up with
2007 Oct 23
10
How is everyone structuring stories?
Bleeding-edge story-writers,
How are you structuring your specs?
I am working on a new project and tried this:
./lib
./blah
./spec
./blah
./stories
But it breaks autotest, so I moved stories parallel to lib and spec.
Also what about suffixes?
I have adopted "xyz_story_spec.rb", and "xyz.story" for the time
being, with the line
runner =
2007 Feb 13
7
Specs of code that use Time.now
Hi
Just trying to spec a Rails model that defaults a valid_until date to
this time tomorrow. I''ve done something similar involving Dates, and
you can stub the :today method to return something fixed. But when I
tried this with Time, I found that RSpec calls Time.now four times
per spec. So there''s no way to spec code like 1.days.from_now . The
best I can come up
2007 Oct 28
4
A better way to stub out constants
Hi
Something that''s gnawing at me... to avoid using the SQLite3 gem I''m
stubbing it out like this:
before(:each) do
@database = mock("SQLite3 database")
SQLite3 = Module.new
SQLite3::Database = Class.new
SQLite3::Database.stub!(:new).and_return(@database)
end
But then it keeps nagging me:
2007 Oct 24
3
How do you specify a rubygem is being required?
Hi
I''m loading a gem on demand but can''t find a way to spec it.
Assuming rubygems is already loaded, I assumed the following would work:
describe SqliteConnection, " class" do
it "should require ''sqlite3''" do
Kernel.should_receive(:require).with("sqlite3")
SqliteConnection.new
end
end
Unfortunately
2007 Oct 31
5
Rspec Release Plan (was Am I missing something with Heckle?)
On Oct 31, 2007 11:36 AM, Scott Taylor <mailing_lists at railsnewbie.com> wrote:
> When can we expect the next release of rspec?
Definitely by the end of November.
Likely by mid-November.
Hopefully in a matter of days.
The next release will be 1.1.0.
We''re going to a release model in which 1.odd.x will be considered
experimental. This means that while we will document
2007 Aug 08
9
RSpec book?
<http://www.apress.com/book/bookDisplay.html?bID=10368>
Came across this as a stub page browsing Amazon UK. This is good
news! I''m surprised it hasn''t been discussed on the list before.
Was Chad keeping it a secret?
I hope it will have plenty of BDD theory. I''m still waiting for that
magic book I can give to someone and say "here - read this, it
2008 Apr 23
1
(no subject)
Hello Samba,
We are using Samba/CIFS hp-ux server connecting to Windows ADS and try
to create keytab file using
net ads create keytab -u Administrator ,but it is unable to create
keytab file in the /etc/directory.
Please see the attached output file for your reference.
Appreciate your help!!
Sudheer Radhakrishnan / Capgemini
North America P&C / East Business Unit
Unix
2007 Nov 13
2
testing scripts
So in the past I''ve written a script that query''s a remote DB, takes
the data, validates it, then does some processing, producing a new file
with the data in a completely different format.
Since this is a script with it''s own set of methods, etc, how do I go
about testing the pieces parts?
It seems like it should be no different than doing the rails testing I
have
2007 Oct 20
3
TextMate bundle in MacroMates repo
Hi
Recently I sent a modified version of the GetBundle bundle to
textmate-dev. It was failing because the RSpec bundle was from
another repo (ie RubyForge). One of the replies said that the RSpec
bundle was now in the MacroMates repo, which it is. Is that an
officially handled thing? If so, what version of the RSpec bundle is
being maintained there - CURRENT? It''s
2007 Jun 27
6
Aspects in RSpec 1.0.5
Forgot post this when I did it...
For anyone else that used the "aspect" method of the rspec-ext gem,
here''s a New World version of the code to drop into spec_helper.rb.
(I''m assuming rspec-ext hasn''t been updated since I did this a week
or two ago)
module Spec
module DSL
module BehaviourEval
module ModuleMethods
def