[rspec-users] Autotest missing specs, not missed in rake spec

2011-03-17 Thread ericindc
I've included the output from running my specs with rake spec and autotest. I've restarted autotest several times to no avail. For some reason, autotest is missing the newsroom_blog_post specs. Any idea how to resolve this? I'd like to continue using autotest, but not if specs are going to be m

Re: [rspec-users] Autotest missing specs, not missed in rake spec

2011-03-17 Thread ericindc
On Mar 17, 12:58 pm, ericindc wrote: > I've included the output from running my specs with rake spec and > autotest.  I've restarted autotest several times to no avail.  For > some reason, autotest is missing the newsroom_blog_post specs.  Any > idea how to resolve this?  I'd like to continue usin

[rspec-users] Testing route with proc --- possible and how?

2011-03-17 Thread David Kahn
I have this route (Rails 3) which handles redirecting shortened urls: # handles the shortened url lookup match ':hash' => redirect { |params| Sharing.get_url_path_by_short_url(params[:hash]) }, :constraints => { :hash => /[a-zA-Z0-9]{7}/ } It works correctly at the ui. However am having troub

Re: [rspec-users] Counter.should_not_receive(:message) not working?

2011-03-17 Thread Pete Campbell
Even simpler... describe 'Show' do it 'should fail because increment is called' do Counter.should_not_receive(:increment)# Incorrectly passes get :show, :count_me => 'true' end it 'should fail because increment is not called' do Counter.should_receive(:increment)# Correct

[rspec-users] Counter.should_not_receive(:message) not working?

2011-03-17 Thread Pete Campbell
I'm trying to test a Rails controller and am having trouble getting SHOULD_NOT_RECEIVE to work on a class method. I can never get Counter.should_not_receive(:xxx) to fail when the message 'xxx' is sent. Controller: def show @counter = Counter.increment if count_me end RSpec: describe 'Show' do

Re: [rspec-users] Counter.should_not_receive(:message) not working?

2011-03-17 Thread Michael Guterl
On Thu, Mar 17, 2011 at 5:25 PM, Pete Campbell wrote: > I'm trying to test a Rails controller and am having trouble getting > SHOULD_NOT_RECEIVE to work on a class method. I can never get > Counter.should_not_receive(:xxx) to fail when the message 'xxx' is sent. > > Controller: > def show >  @coun

Re: [rspec-users] Counter.should_not_receive(:message) not working?

2011-03-17 Thread Justin Ko
On Thu, Mar 17, 2011 at 2:55 PM, Pete Campbell wrote: > Even simpler... > > describe 'Show' do > it 'should fail because increment is called' do >Counter.should_not_receive(:increment)# Incorrectly passes > get :show, :count_me => 'true' > end > it 'should fail because increment i

[rspec-users] 'spec' command not working

2011-03-17 Thread Will C.
When I run JSpec, in the command prompt, using the "spec" command, I get this error: 'spec' command not recognized as a command I have the latest versions of JSpec and Ruby installed. How can I use the spec command? Not sure what to put in my PATH environment variables. Thanks! -- Posted via h

Re: [rspec-users] Counter.should_not_receive(:message) not working?

2011-03-17 Thread Pete Campbell
Justin Ko wrote in post #988060: > I would say "count_me" is not returning what you think it is. Try adding > "raise count_me.inspect" in the controller action to see if this is the > case. Thanks for the feedback. The code snippet isn't the exact code, it is simplified to demonstrate the proble

Re: [rspec-users] Counter.should_not_receive(:message) not working?

2011-03-17 Thread David Chelimsky
On Mar 17, 2011, at 8:24 PM, Pete Campbell wrote: > Justin Ko wrote in post #988060: > >> I would say "count_me" is not returning what you think it is. Try adding >> "raise count_me.inspect" in the controller action to see if this is the >> case. > > Thanks for the feedback. The code snippet isn