search for: experthuman

Displaying 12 results from an estimated 12 matches for "experthuman".

2007 Dec 05
9
Does mock_model''s :null_object option work?
Please understand in the following that I am making relatively minor changes to legacy (non-TDD/BDD) code in Substruct and don''t have the time to refactor nicely right now. I''m just trying to get past the untested/un-speced cruft quickly to write the spec for my new code, so I''m looking for expediency over prettiness. I''m specifying before( :each ) do
2007 May 30
18
autotest and rspec_on_rails not happy
Hi, I''ve been using the rspec and rspec_on_rails plugins quite happily on my Rails project for a while now. Today I noticed the autotest support in RSpec-1.0.3 and decided to give that a spin. Oh tragedy! $ autotest loading autotest/rails_rspec ./vendor/plugins/rspec_on_rails/lib/autotest/rails_rspec.rb:33:in `initialize'': undefined method `singularize''
2007 Dec 14
5
How do I mock params?
Here is the code within the controller: Line 69: @photo = @member.build_photo(params[:photo]) unless params[:photo][:uploaded_data].blank? I got a little ahead of myself and wrote the code, and now have a bunch of errors telling me that: ------- 6) NoMethodError in ''Spec::Rails::Example::ControllerExampleGroup MembersController handling PUT /members/1 should find the member
2007 Oct 25
1
Plain Text Stories: Part III
> Step 3: Let her open the box ? no, that?s not it ? I''m ashamed to admit it, but I actually laughed out loud. (And, erm, the step groups are cool, too.) Thanks, David!
2007 Jul 13
4
spec for Rails library
How does one write a spec for a Rails library? // Gregory
2007 Nov 01
8
Specifying mixins
Hi folks, Can anyone share some accumulated wisdom about the best way to spec mixins in general, and (Jamis Buck-style) ActiveRecord "concerns" in particular? The standard situation here is that there''s a bunch of functionality, related by concept if not by implementation, that one wants to inherit in many different classes (e.g. ActiveRecord models) without having to
2007 Aug 29
2
DRY specs for RESTful controllers
Hi, I''m developing a RESTful Rails application whose code and specs are becoming increasingly repetitive: every controller does pretty much the same set of things (give or take the occasional twiddle), for example, and so every controller spec is almost identical modulo some names, constants and strings. The make_resourceful plugin, which autogenerates the boilerplate REST
2007 Nov 28
6
Newbie question
I installed Rspec and am getting the following failure: $ sudo gem install rspec Successfully installed rspec-1.0.8 Installing ri documentation for rspec-1.0.8... Installing RDoc documentation for rspec-1.0.8... $ spec -v RSpec-1.0.8 (r2338) - BDD for Ruby http://rspec.rubyforge.org/ $ cat acct.rb describe Account, " when first created" do it "should have a balance of $0"
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
2008 Nov 04
18
Can I do foo.should (be_nil || be_empty) in rspec
Is there any way to do foo.should (be_nil || be_empty) in rspec. Thanks in advance -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20081104/ee43c9c9/attachment.html>
2007 Oct 14
40
Step matchers
I think we all know that the readability of steps isn''t great right now, and in fact there''s a very recent thread that discusses just that. It was that recent thread that prompted me to explore this a bit. The basic idea is that you define step matchers, which have a regex, and then you match step names against that regex. Kind of tough for me to explain so I''ll just
2007 Sep 14
0
using #include in shared behaviours
Hi folks, Is there any way I can call #include from within a shared behaviour without it blowing up?: > vendor/plugins/rspec/lib/spec/dsl/shared_behaviour.rb:48:in > `included'': private method `include'' called for #<Class:0x3047484> > (NoMethodError) More detail: I have a spec/concerns directory which contains specs corresponding to mixins in