Re: [rspec-users] testing a post to a controller's create action

2011-11-18 Thread Mike Mazur
Hi, On Sat, Nov 19, 2011 at 09:42, Patrick J. Collins wrote: > I just spent a lot of time trying to get a test to pass that would not pass no > matter what I did, and I finally decided to just do something really simple to > verify that even that was working-- and it's not. > > class PostsControl

Re: [rspec-users] testing a post to a controller's create action

2011-11-18 Thread David Chelimsky
On Nov 18, 2011, at 7:42 PM, Patrick J. Collins wrote: > I just spent a lot of time trying to get a test to pass that would not pass no > matter what I did, and I finally decided to just do something really simple to > verify that even that was working-- and it's not. > > class PostsController <

[rspec-users] How to create stub_models with connections to other models

2011-11-18 Thread Denise Mauldin
Hello all, Please help with my question, detailed here: http://stackoverflow.com/questions/8002318/ruby-rails-rspec-local-variables Thanks, Denise ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

[rspec-users] testing a post to a controller's create action

2011-11-18 Thread Patrick J. Collins
I just spent a lot of time trying to get a test to pass that would not pass no matter what I did, and I finally decided to just do something really simple to verify that even that was working-- and it's not. class PostsController < ApplicationController def create debugger

Re: [rspec-users] What does :count actually mean in assert_select?

2011-11-18 Thread Gordon Yeong
I think i answered my own question. :count refers to the number of fixture objects. The reason why :count => 2 was passing for views index specs is because 2 objects are being mocked and they are identical. Hence, there are 2 stock tests: 1) asserts that there are 2 elements which have the

[rspec-users] What does :count actually mean in assert_select?

2011-11-18 Thread Gordon
Hi guys, I tried reading up the RSPEC Book (Dec 2010) and googled a bit but I could not find anything. I'm using Rspec2. Example: spec/factories/categories.rb == FactoryGirl.define do factory :category_intakes, :class => 'category' do name'intakes and filter

Re: [rspec-users] How to access local variable(s) of controller methods called via RSpec in Rails 3

2011-11-18 Thread Mohnish G j
> Now you probably want to specify how/when the cache expires as well, but > that's a different matter. This only covers the caching itself. > > HTH, > David Thanks David, your inputs were really useful. How do you suggest I can test expiry of cache in this scenario. Are there any common strategie