search for: activerecordmatchers

Displaying 3 results from an estimated 3 matches for "activerecordmatchers".

2007 Mar 29
21
a better "should have valid associations"
...ly testing the framework, and such code belongs in the framework itself. Also, this won''t check if you removed some associations. And it won''t check for polymorphs either.) Put this somewhere handy and require it into spec_helper. ======================================== module ActiveRecordMatchers class HaveValidAssociations def matches?(model) @failed_association = nil @model_class = model.class model.class.reflect_on_all_associations.each do |assoc| begin model.send(assoc.name, true) model.class.send(''find'', :first, :in...
2007 May 26
11
RSpec
...to run rake spec but received: 330-07:~/desktop/restful_auth_rspec/vendor multimedia$ rake spec (in /Users/multimedia/Desktop/restful_auth_rspec) /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:266:in `load_missing_constant'': uninitialized constant ActiveRecordMatchers (NameError) from /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:452:in `const_missing'' from /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:464:in `const_missing'' from ./spec...
2007 Oct 08
17
(no subject)
Just ran svn up this morning, and got this (after running ./script/ generate rspec) escher: ./script/spec spec/models/item_spec.rb Finished in 8.0e-06 seconds 0 examples, 0 failures ./script/spec:4:in `run'': wrong number of arguments (3 for 1) (ArgumentError) from ./script/spec:4 Using rails 1.2.3, rspec trunk, on Mac OS X.4.9. Any ideas, or is this a bug in