similar to: Rails 2.0/Autotest "Color is not a class"

Displaying 20 results from an estimated 2000 matches similar to: "Rails 2.0/Autotest "Color is not a class""

2007 Nov 30
4
Autotest''ing specs on non-rails app
I''m having trouble using autotest with rspec on a non-rails project. my Rspec gem is version 1.0.8, ZenTest is 3.6.2 project structure $ ls * lib: parser.rb spec: parser_spec.rb autotest finds and runs the spec, but it won''t detect changes to lib/parser.rb I know it''s something stupid, but... help? -- Rick DeNatale My blog on Ruby
2008 Mar 09
4
comment avoir la liste des gems ?
bonjour , je voudrais savoir de quelle façon est ce qu''on peut savoir les gems installés dans un serveur hebergeur sans avoir acces au SSH ? pour les informations sur rails ou ruby c''est fait ;) en utilisant la commande suivante dans une view : Rails::Info.to_html mais le probleme ça donne pas de detail sur les gems !!!! une idée ?
2008 Mar 20
4
Blank DateTime versus Nil DateTime
Hi! These days I have been having trouble with a test that tried to test DateTime functionality. I have discovered that a NULL DateTime is auto-type casted to NIL by Rails. My problem here is that I have a field :datetime and I want to allow NULL datetimes but not wrong datetimes. With this validation if deadline is wrong or if is is blank it returns true. How I can accomplish this? protected def
2008 May 21
8
before_filter with multiple roles
I have multiple roles in my application. Now I want to block a method for all users except the administrator and a manager. When I do this: before_filter (:check_administrator_role), :only => [:administration] before_filter (:check_taskmanager_role), :only => [:administration] The user must have both roles. How can I change that to an "OR" combination? -- Posted via
2008 Mar 20
5
How to unit test Rails itself (API)?
Hello, I searched unit test for Rails on internet, but all the results are for testing Rails APPLICATION generated by Rails. But I think Rails itself needs unit test, too. I need to make sure that all APIs/methods of Rails work fine in different scenarios. I didn''t see any unit test files in the Rails package. Does anyone know how to unit test Rails itself? Thanks a lot.
2007 Oct 15
4
ArgumentError in StoreController#add_to_cart: wrong number of arguments (1 for 0)
I am really new to Ruby and Rails but as you probably see I am trying to get the shopping card working from the book. I am getting this error but I really don''t know what to do. I have looked up several of topics that stated the same problem but as far as I am, nothing has helped me out yet. Is there something wrong with the Product model? This is in the StoreController and I believe it
2008 Feb 12
8
has_many through question
I have made 3 tables +------------+ +----------------+ +------------+ |people | |people_campaigns| |campaigns | +------------+ +----------------+ +------------+ |id :int | <----> |people_id :int | /-> |id :int | |name :string| |campaign_id :int| <-/ |name :string| |etc ... | |exported :int |
2009 Aug 12
5
Challenge for object_id, Garbage Value
I am facing strange problem. I have an object @part=MainPart.find(:all) 1. @part.each_with_index do |mainpart,index| 2. <p><%= mainpart.object_id%></p> 3. end Here problem is that object_id is reserved for rails. Here object_id field in my table . Now i want to get value <%= mainpart.object_id%> is giving GARBAGE VALUE. Is there any solution apart from
2007 Dec 10
15
Scaffolding for pre-existing database table in 2.0.1
Hi, first of all I will apologize in advance for my presumably noobish question, but I''m only starting to learn Rails and am a little confused with all the changes in 2.0.1. There are as good as no tutorials out yet and the 2 or 3 screencasts I''ve seen deal with the creation of both the app and the database. Now my problem is that I already have a database with a fair amount of
2008 Jan 29
3
I thought the RSPec community might be interested
in my latest blog posting :http://talklikeaduck.denhaven2.com/articles/2008/01/29/why-i-dont-mind-using-rspec-in-fact-ive-come-to-love-it -- Rick DeNatale My blog on Ruby http://talklikeaduck.denhaven2.com/
2008 May 16
3
Which rspec for rails 2.1RC1?
I''m working on porting our app. Do I need to upgrade rspec from 1.1.3? If so which version. BTW the installation doc at http://rspec.info/documentation/rails/install.html seems to be stuck in the pre-git days. -- Rick DeNatale My blog on Ruby http://talklikeaduck.denhaven2.com/
2007 Dec 13
16
"Tricks" for testing after_create callback???
I''ve got a model Message, which needs to send an email using action mailer after it''s first saved in the database. I want to pass the model to the mailer which then uses methods on the message model to render the email. So the natural way to do this is in an after_create callback on the Message model. But I can''t see an easy way to test this. Here''s my spec
2008 Jan 21
5
attachment_fu and story runner, any updates
I''m trying to write a story for a Rails app which involves using the attachment_fu plugin to upload images. After blunting my pick on this for a while, google found me this: http://www.ruby-forum.com/topic/134743#600831 So it seems that there''s a hole in Rails integration testing and multipart form posting. David offered to incorporate a patch to story runner at the end of the
2008 Jan 31
4
reby-debug and rspec
How do I use the ruby debugger with a specific test (not the whole spec file)? I want to do something like this. $ rdebug spec/models/user_spec.rb -s "should error if not new_record" ____________________________________________________________________________________ Looking for last minute shopping deals? Find them fast with Yahoo! Search.
2007 Dec 14
13
RSpec-1.1.0 is released
The RSpec Development Team is pleased as glug (that''s kind of like punch, but more festive) to announce RSpec-1.1.0. Thanks to all who have contributed patches over the last few months. Big thanks to Dan North and Brian Takita for their important work on this release. Dan contributed his rbehave framework which is now the Story Runner. Brian patiently did a TON of refactoring around
2008 Mar 08
3
should_receive(:foo).with(any_object)
Hey, I just ran into a situation where I would like to expect a method call with an argument I know and another one, which is a random number. I think mocking up the rand method is somehow ugly so I thought maybe this is the first time where I can take something from Java to Ruby ;) Java''s EasyMock mocking library knows things like "anyObject()" and "anyInteger()" in
2008 Mar 14
5
Branching scenarios, GivenScenario and database
I''m trying to use stories to drive some high-level design. I''ve got some branching scenarios where I want to follow a scenario, to establish a base situation, and then have different scenarios which ''branch'' out from that state, possibly several levels deep. I asked a bit about this a few days ago, and David pointed out the rather undocumented GivenScenario
2008 Mar 11
2
Composed Stories/Scenarios
In using stories, I find myself wanting to build scenarios on top of each other, For example I want something like Scenario: The user logs on Given a And b When c And d Then e And f Scenario: The user changes his password Given the user logs on And g Then h In other words, I''d like to write the second scenario starting with the ''state'' produced by
2008 Mar 05
14
ActiveRecord, spec''ing find has right :order parameter
I''m wanting to write a spec that a model is applying an :order option to a find call, but I don''t want to completely specify all of the find parameters. So I want to write something like this, say in a controller spec User.should_receive(:find).with(:all, hash_with_at_least(:order => ''user.name ASC'')) get ''index'', :sort =>
2008 May 03
4
silly partial qu
hi all, i''m just trying to check a partial has been rendered, by using: response.template.should_receive(:render).with(:partial => "tasks/list") this passes, even if I put something bogus in the partial name, such as: response.template.should_receive(:render).with(:partial => "___tassdfsdfks/list") does anyone know why this doesn''t fail? is this the