similar to: Do message expectations work in story steps?

Displaying 20 results from an estimated 10000 matches similar to: "Do message expectations work in story steps?"

2008 Jun 02
1
Cherry-picking mocks?!
A colleague just came in and asked me about a problem he was having with stub_render, which reminded me of another issue he had a week or so ago, which seems related. Let me start with the earlier issue. He was trying to write specs for a method which sends the same message possibly multiple times, but with different arguments under different calling conditions. He wanted to write
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 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 Jan 21
3
Story runner "macros"
I''ve gotten quite a bit out of Pat Maddox''s screencast http://evang.eli.st/blog/2007/10/8/story-runner-top-to-bottom-screencast One thing I''m not sure of is the feature where he writes things like: When "I POST to", "/articles", :post => {:title => "Title", :body => "Body") do | path, params| post_via_redirect
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
2009 Oct 23
1
Anyone using the rspec textmate bundle with Ruby 1.9.1
I''m now in the process of facing converting a rails app to use Ruby 1.9.1. Has anyone figured out how to use 1.9 with the RSpec bundle in textmate and preferably how to switch back and forth? -- Rick DeNatale Blog: http://talklikeaduck.denhaven2.com/ Twitter: http://twitter.com/RickDeNatale WWR: http://www.workingwithrails.com/person/9021-rick-denatale LinkedIn:
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 Nov 14
2
Exception Notification plugin options hash handling????? backwards merge?
Today I worked on adding email exception notification to some ancillary background processes for a Rails app. Since I was already using Jamis'' exception notification plugin to notify me of errors in controllers for the web app, I figured that the path of least resistance was to try to figure out how to hook it into the daemon code. At first it looked easy. I just needed to
2009 Oct 30
1
Any pioneers who've configured passenger to support some apps running in 1.8.x others in 1.9?
Passenger configuration selects which ruby executable to use via a global configuration variable (at least for Apache, I assume it''s the same for Nginx). I''m in a situation where I''ve got at least one rails app I''d like to run on 1.9 while others remain on 1.8. This is for my development machine running OS X 10.6. Normally I just use the Passenger PrefPane,
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
2010 Apr 28
0
Route globbing in Rails 3 beta 3
I was just playing around with the new routing dsl to answer someone''s question on the general rails forum. I wanted to see how Rails3 handled globbed routes. So I added this to routes.rb get ''forum/*path'' , ''forum#show'' And had the show action just display the params. with a URL of /forum/a/b/c I got {"path" => "a/b/c"}
2011 Apr 07
0
accepts_nested_attributes_for, validations, :inverse_of option on associations, and IdentityMap
This feels more like a question to ask the core list, forgive me if I trespass. I''ve been trying to help one of my cow orkers get through a sticky problem. He''s got a fairly complex nested form to update a model and its children. He''s started adding some validations, and we''ve encountered a number of issues: First he had a validation on one of the child
2009 Jun 30
0
ri_cal 0.7.0 Released
Subject: [ANN] ri_cal 0.7.0 Released ri_cal version 0.7.0 has been released! * <http://ri-cal.rubyforge.org/> * <by Rick DeNatale> A new Ruby implementation of RFC2445 iCalendar. The existing Ruby iCalendar libraries (e.g. icalendar, vpim) provide for parsing and generating icalendar files, but do not support important things like enumerating occurrences of repeating events. This
2008 Jun 12
0
Mysterious interaction between RSpec 1.1.4 and has_finder/named_scope
I just opened a Rails ticket on a problem with named_scope in Rails 2.1, and cross-posted a message here which I send to rails-core. I''m still a bit mystified, because I''m having a problem caused by this on RSpec 1.1.4, but not on 1.1.3, and I don''t see a difference in code which would explain it. The basic problem, which I encountered upgrading our rails app to RSpec
2007 Dec 18
2
rpec_scaffold and nested resources
I''ve got a love-hate relationship with script/generate rspec_scaffold If you are using non-nested controllers/resources it''s great. I love the spec skeletons it generates. But I find myself doing this, where Y is and existing set of model/controller ... representing a resource: 1) script/generate rspec_scaffold x .... At this point rake spec passes. 2) edit config/routes.rb
2008 Jan 17
0
It seems to be a restful_authentication bug (was Re: Re: named route new_session not working)
On 1/16/08, Jimmy Palmer <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote: > > sorry for the ambiguity. I will work on being more descriptive. :) > > In the method access_denied in the file authenticated_system.rb from > restful athentication, it generates this: > > def access_denied > respond_to do |format| > format.html do >
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 Jul 09
2
Can I get RSpec NOT to abort rake on failing specs?
At work we''ve got a rather complex app with both specs and tests. Our default rake task runs all our our tests and specs. We''ve also got separate rake tasks to run groups of tests and specs in the various subdirectories. The default task simply lists all the individual tasks as pre-reqs. We do a lot of branching and merging, so we really want to run all of the tests and specs
2008 Jun 12
0
named_scope doesn''t check for critical method names.
I just entered this ticket. http://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/404-named_scope-bashes-critical-methods It turns out that in an ActiveRecord model like this Model << ActiveRecord::Base named_scope :public private def private_method end public def public_method end end The method public_method will be private because named scope
2008 Jan 26
0
RSpec and resource_controller plugin
I just discovered James Golick''s resource_controller plugin http://jamesgolick.com/resource_controller after spending another stretch of boredom making the changes to nest yet another rails resource controller. I''d actually slowed down this time to think about what I was doing in hopes of automating the task. I''ve tended to use script/generate rspec_scaffold to get