[rspec-users] Ruby Debugger - not working in rspec?

2011-03-03 Thread Jason Nah
Howdy, I'm trying to get the ruby debugger to breakpoint at a specific line in source. Here's what I did: - Added require "ruby-debug" in spec_helper.rb - Added gem dependency to Gemfile (gem "ruby-debug" - In the spec, added before do breakpoint; 0; end - Ran it with rspec spec/mode

[rspec-users] How to intercept an instance method from StdLib (1.9.2)

2011-03-03 Thread Hedge Hog
Hi, I'm struggling with something that seems to be simple, and I've not had any joy following the RSpec books suggestions (p. 187). I'd like to test that a method raises and error when a file is not found. I've tried adding this in my example just before I call my method, but it never seems to get

[rspec-users] [Solved] Re: Does RSpec interfere with Pathname#dirname or Pathname#realpath ?

2011-03-03 Thread Hedge Hog
On Fri, Mar 4, 2011 at 10:08 AM, Hedge Hog wrote: > Hi, > I starting a new project, and have run into behavior I cannot > replicate in irb, (i.e. outside of using rspec) when the directory? > returns true, so I thought I'd ask here, in case any one has seen this > badhavior. > ruby-1.9.2-p136 > rs

[rspec-users] Does RSpec interfere with Pathname#dirname or Pathname#realpath ?

2011-03-03 Thread Hedge Hog
Hi, I starting a new project, and have run into behavior I cannot replicate in irb, (i.e. outside of using rspec) when the directory? returns true, so I thought I'd ask here, in case any one has seen this badhavior. ruby-1.9.2-p136 rspec (2.5.0) rspec-core (2.5.1) rspec-expectations (2.5.0) rspec-m

[rspec-users] Callback when tests are done

2011-03-03 Thread Jeremy Woertink
Currently when I run my tests, I run $ rspec spec/ -cf nested Is there a way to have a callback that when this task is done running, I can hook into how many tests failed, or how many passed, and have my own code run right after? Right now I'm just using an at_exit {} and putting some stuff in t

Re: [rspec-users] How to do controller.stub(:some_method) at request test when using rspec2

2011-03-03 Thread David Chelimsky
On Mar 3, 2011, at 1:36 AM, Jiang Guimin wrote: > Hi, > I hava a controller > > class DynamicFlowsController < ApplicationController > > def create > @workflow = Workflow.find_by_id(params[:workflow_id]) > table = @workflow.flex_table > save_u_and_node(table, @workflow.node_de

Re: [rspec-users] How to do controller.stub(:some_method) at request test when using rspec2

2011-03-03 Thread Rob Aldred
On 3 Mar 2011, at 07:36, Jiang Guimin wrote: > Hi, > I hava a controller > > class DynamicFlowsController < ApplicationController > > def create > @workflow = Workflow.find_by_id(params[:workflow_id]) > table = @workflow.flex_table > save_u_and_node(table, @workflow.node_def

Re: [rspec-users] calbacks on models

2011-03-03 Thread David Chelimsky
On Mar 2, 2011, at 11:49 AM, Andrea Reginato wrote: > Hi, I'm having some strange behavior on callbacks when testing with > RSpec2. On my test, when I create a resource using the #create method > the callbacks related to #before_create are not called. If I go to the > console and I try to type the

Re: [rspec-users] Cucumber not inserting record in db

2011-03-03 Thread Matt Wynne
Hi Tushar, On 3 Mar 2011, at 04:39, Tushar Gandhi wrote: > Hi, > I am trying to learn Cucumber. I have followed the tutorial on > "http://www.ultrasaurus.com/sarahblog/2008/12/rails-2-day-3-behavior-driven-development/"; > > Everything is working fine but my problem is it is not inserting any >