Re: [rspec-users] Can you control $stdout when specs are running?

2011-01-12 Thread shea
Why not stub System.out.println, possibly with message expectations if necessary? > > On Sep 30, 2010, at 10:06 AM, GregD wrote: > >> Hi all, >> >> I'm testing java classed using rspec and jruby. The java super class >> is trapping an exception and sending a custom message to stdout along >> with

[rspec-users] Mocking a Model Class and a View with RSpec-Rails

2010-12-07 Thread Shea Levy
communication. spec/controllers/users_controller_spec.rb: require 'spec_helper' describe UsersController do describe "POST create" do it "creates a new user" do User.should_receive(:new).with("name" => "Shea Levy") post :create, :user =

[rspec-users] Rescuing a Test-Free Project with RSpec and Cucumber

2010-12-11 Thread Shea Levy
is a complete refresh necessary? If the former, how do I go about doing that? If the latter, how do I do it in a way that keeps overall functionality of the resulting project the same as the original? Cheers, Shea Levy___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

[rspec-users] BDD and Performance

2010-12-28 Thread Shea Levy
eature(s) and spec(s) would I write to drive me to that migration? Cheers, Shea Levy___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

[rspec-users] BDD and Interacting With External Resources

2010-12-28 Thread Shea Levy
Hi all, What's the best way to handle features which rely on an external API in a behaviour-driven way? Suppose I have an app which manages online ordering from several independent stores, with a cut taken from each purchase, and I want to add a feature whereby orders made by phone that were fa

[rspec-users] Webrat or RSpec and Table Headers

2010-12-28 Thread Shea Levy
Hi all, Suppose I have a table that lists all of my products, that includes a a somewhere in the first , and each product has its data held within a . After updating a product's description, I want to write something like: within "tr#category#{category.id}" do under_header "Description" do

[rspec-users] Specing Ajaxy Views

2010-12-29 Thread Shea Levy
Hi all, I am working on a feature to allow administrators of an online store to rearrange the order in which their product categories show up on the site. I want to use a simple implementation of sortable_lists (madrobby.github.com/scriptaculous/sortable-lists-demo/) to allow the administrators