Re: [rspec-users] Heckle & RSpec 2

2010-07-15 Thread David Chelimsky
On Jul 15, 2010, at 5:53 PM, ericindc wrote: > How do I run Heckle with RSpec? I've tried rake spec --heckle but get > no output. I've tried just -heckle too, as mentioned in the docs, but > that isn't accepted as a valid option and the help out is displayed. > I have both the heckle and rspec-r

[rspec-users] rspec route question

2010-07-15 Thread Matt Kolenda
Hello I'm having some trouble getting rspec to recognize a route. # This works describe "routes" do it "should have a route" do { :get => "/accounts/3/jobs/3/ applications/1/edit" }.should route_to(:controller => 'applications', :action => 'edit', :id => "1", :account_id => "3", :jo

[rspec-users] Heckle & RSpec 2

2010-07-15 Thread ericindc
How do I run Heckle with RSpec? I've tried rake spec --heckle but get no output. I've tried just -heckle too, as mentioned in the docs, but that isn't accepted as a valid option and the help out is displayed. I have both the heckle and rspec-rails gems in my Gemfile, and running Rails 3, and have

Re: [rspec-users] Help needed for instslling rspec

2010-07-15 Thread David Chelimsky
On Jul 15, 2010, at 12:36 PM, Patel, Mihir wrote: > Hi All, >I am new to BDD. I have ruby 1.8.7 on my RHEL5 computer. I am trying to > install RSpec by “gem install rspec” but I get an error saying : “could not > find rspec locally or in a repository”, Please help me out. Please type "gem

[rspec-users] Help needed for instslling rspec

2010-07-15 Thread Patel, Mihir
Hi All, I am new to BDD. I have ruby 1.8.7 on my RHEL5 computer. I am trying to install RSpec by "gem install rspec" but I get an error saying : "could not find rspec locally or in a repository", Please help me out. Regards, [ Mihir Patel | SDE Intern | +919 889 9537 | mih...@amazon.com

[rspec-users] Questions about testing a module method that randomly creates stuff from list.

2010-07-15 Thread Greg Ditrick
All, I have a method in a shared Module that shuffles data and then output other data. The method is somewhat large (maybe 50 lines) and sometimes calls other sub methods to help to complete the output which must meet a specific criteria or it re-shuffles. My questions are: 1) How do I

[rspec-users] Questions about testing a module method that randomly creates stuff from list.

2010-07-15 Thread GregD
All, I have a method in a shared Module that shuffles data and then output other data. The method is somewhat large (maybe 50 lines) and sometimes calls other sub methods to help to complete the output which must meet a specific criteria or it re-shuffles. My questions are: 1) How do I cap

Re: [rspec-users] spec for a rails helper that renders a partial template

2010-07-15 Thread Jonathan Rochkind
David Chelimsky wrote: > > I don't think there's a good way to do that in RSpec-1. In RSpec-2, > however, you should be able to do this in a regular helper spec. Okay, thanks. Can't wait until I get my app migrated to Rails3, glad that Rspec has improved in flexibility in a great many ways, it

Re: [rspec-users] set expectation using self in constructor?

2010-07-15 Thread Chuck Remes
On Jul 14, 2010, at 4:20 PM, Matt Wynne wrote: > > You can do this, by using a test spy to remember the value of foo passed into > the stubbed constructor and then later comparing it: > > let(:foo) { Foo.new } > > it "should allocate a helper class Foo" do > actual_foo = Bar.should_receive(:

Re: [rspec-users] set expectation using self in constructor?

2010-07-15 Thread Chuck Remes
On Jul 14, 2010, at 4:20 PM, Matt Wynne wrote: > > You can do this, by using a test spy to remember the value of foo passed into > the stubbed constructor and then later comparing it: > > let(:foo) { Foo.new } > > it "should allocate a helper class Foo" do > actual_foo = Bar.should_receive(:

Re: [rspec-users] spec for a rails helper that renders a partial template

2010-07-15 Thread David Chelimsky
On Jul 13, 2010, at 6:59 PM, Jonathan Rochkind wrote: > David Chelimsky wrote: >> On Jul 13, 2010, at 6:05 PM, Jonathan Rochkind wrote: >> >> Do you know about integrate_views? >> >> http://rspec.info/rails/writing/controllers.html > > I read about it in my quest through the documentation for a

Re: [rspec-users] before(:all) to set up mocks and stubs

2010-07-15 Thread Ivo Dancet
Thanks for your answers. I'll use a fixture replacement to set up the environment. I know that this (using before(:all) to setup a state) is not a best practice. In this case however, I would consider my approach to be acceptable as the pdf takes a long time to generate. All tests run on the sa