search for: zonneveld

Displaying 14 results from an estimated 14 matches for "zonneveld".

Did you mean: sonneveld
2009 Feb 28
7
be_valid (validates_format_of ..., :on => :create)
Greetings, How to write Example which will check if model''s variable''s format is valid using :on => :create, like this: class User < ActiveRecord::Base ... validates_format_of :email, :with => /.../, :on => :create ... Using following code is not right: it "should ..." do @user = users(:example_user) @user.email =
2007 Dec 20
3
How-to spec this helper method?...
Hey gang, I have this dead-simple method defined in a helper: def add_category_link(name) link_to_function name do |page| page.insert_html :bottom, :categories, :partial => ''category'', :object => Category.new end end Where, and mostly how, would I spec this? I haven''t been able to find how to stub the rjs in a helper spec, so
2009 Feb 02
5
[Cucumber] Cucumber and acts_as_xapian
Hey list, Anyone have experience with acts_as_xapian and Cucumber? I''m struggling with updating xapian''s index, to actually "find" fluff that has been indexed.. In a scenario, I''m adding a bunch of articles, and in the actual search step, I run: When "I search for \"$query\"" do |query| %x[rake RAILS_ENV=test xapian:update_index]
2008 Mar 13
22
Specifing methods in a steps_for block
Hey list, I''m refactoring some much-used functionality into a common_steps step group. Methods like this are in there: steps_for :common do Given "a number of existing $types?" do |type| @initial_item_count = type.singularize.classify.constantize.count end When "the user adds an invalid $type" do |type| post
2008 Jun 04
8
Why has the --color gone from my life?
Hi all, Running on OSX 10.5.3, Latest Rspec trunk, Rspec rails trunk, latest autotest gem and rails 2.1 I''ve lost my colour output in autotest. rake spec gives colour output, but autotest gives me black and white. It was working a little bit before, I think I upgraded to the latest versions of everything to get all the textmate snippets talking and being friendly to one another again
2009 Jan 17
3
[Cucumber] Struggling with "multiple step definitions"
Hey gang, I find myself struggling with multiple step definitions in cucumber all the time. I regularly test the contents of my flash[:notice] in steps, since I think that''s part of the behaviour of the app. So, while implementing a new feature, I ran into the following error: /opt/local/lib/ruby/gems/1.8/gems/cucumber-0.1.15/bin/../lib/cucumber/ step_mother.rb:81:in
2008 Aug 29
3
BDDish rspecish question
Hey list, This is a kinda quirky question for this list, but I do think it belongs here. I''m currently writing an app with users with different roles. Roles are sequentially so to speak, so role 2 can do everything role 1 can, and so on. If I truly test my whole app, I should test all behaviour for each role, I guess. I could solve that by doing some clever shared steps and
2007 Oct 05
20
RSpec Book(s) on the radar
I just found this one: http://tinyurl.com/3c3mfa David, are there any other RSpec books in the works? With Regards, Cody Skidmore
2007 Dec 14
9
new home for the rspec website
Hi all, We''ve moved the rspec website to http://rspec.info. We want http://rspec.org, of course, but someone is squatting on and has yet to respond to my email :( The 1.1.0 docs are there. The 1.0.8 docs are still at http://rspec.rubyforge.org for the time being. We''ll be archiving them at the new site soon. This new site is hosted on our shiny new sponsored slice at Engine
2009 Feb 04
2
Can cucumber/webrat set a value on a hidden field
I am using auto_complete to provide a list of persons from which the user can select one. On selection from the auto_complete list, a hidden field is updated with the id of the selected person. This is all wrapped in a form, that then can be submitted by the user (by clicking the provided submit button). On submission, the person (based on the id in the hidden field) is added to a group. I assume
2008 May 26
7
Mocking Models in Controller Specs...
I find myself doing this kind of thing a lot in Controller Specs: @vacancy = mock_model(Vacancy) @vacancy.stub!(:reference) @vacancy.stub!(:title) @vacancy.stub!(:created_at) @vacancy.stub!(:updated_at) @vacancy.stub!(:body) @vacancy.stub!(:contract) @vacancy.stub!(:location) @vacancy.stub!(:salary) @vacancy.stub!(:benefits)
2006 Sep 19
1
Callback sto InstanceMethods in a plugin
Hello there, I''m currently building a plugin, for which I need a before_save callback. The method I want to call is in module InstanceMethods, but when I add a before_save foo, foo, as defined as an InstanceMethod, never gets called. This is the first plugin I''m building, after only two weeks of fiddling with Ruby and Rails, so if anyone is kind enough to help me out.... :)
2006 Oct 15
0
Could not find the association
Hey peeps, I have the following models: class Profile < ActiveRecord::Base has_many :tracks, :through => :watcher has_many :watchers end class Watcher < ActiveRecord::Base belongs_to :profile belongs_to :watchable, :polymorphic => true end class Track < ActiveRecord::Base has_many :watchers, :as => :watchable, :dependent => :destroy has_many :profiles, :through
2007 Oct 24
0
STI vs CTI vs something else?...
Hey gang, I have these classes: class Image < UploadFile validates_file_format_of :filename, :in => ["gif", "png", "jpg"] end class UploadFile < PropertyItem file_column :filename validates_presence_of :filename end class PropertyItem < ActiveRecord::Base validates_presence_of :name end What I''m trying to achieve is a class