Re: [rspec-users] spec'ing view render partial collection, local variable not found

2007-10-06 Thread Andrew WC Brown
I outputted name and enabled to see if it the mock object was working. before do game = mock_model(Game, :name => 'The Battle for Blaze', :enabled => 'true') puts game.name puts game.enabled game.should_receive(:name).and_return('The Battle for Blaze') game.should_receive(:enabled).and_r

Re: [rspec-users] spec'ing view render partial collection, local variable not found

2007-10-05 Thread Andrew WC Brown
before do game = mock_model(Game, :name => 'The Battle for Blaze', :enabled => 'true') puts game.name puts game.enabled game.should_receive(:name).and_return('The Battle for Blaze') game.should_receive(:enabled).and_return('true') @game = game end I still got the error but I saw in th

Re: [rspec-users] spec'ing view render partial collection, local variable not found

2007-10-05 Thread David Chelimsky
I meant the view code as well. On 10/5/07, Andrew WC Brown <[EMAIL PROTECTED]> wrote: > As soon as I add a second key to the hash it gives me that error > > before do > game = mock_model(Game, :name => 'The Battle for Blaze', :enabled => > 'true') > game.should_receive(:name).and_return('The B

Re: [rspec-users] spec'ing view render partial collection, local variable not found

2007-10-05 Thread Andrew WC Brown
As soon as I add a second key to the hash it gives me that error before do game = mock_model(Game, :name => 'The Battle for Blaze', :enabled => 'true') game.should_receive(:name).and_return('The Battle for Blaze') game.should_receive(:enabled).and_return('true') @game = game end 1) Spec:

Re: [rspec-users] spec'ing view render partial collection, local variable not found

2007-10-05 Thread Andrew WC Brown
_game.rhtml_spec require File.dirname(__FILE__) + '/../../spec_helper' describe "/games/_game.rhtml" do include GamesHelper before do game = mock_model(Game, :name => 'The Battle for Blaze', :salt_grains => 500, :people => 500, :days => nil, :created

Re: [rspec-users] spec'ing view render partial collection, local variable not found

2007-10-05 Thread David Chelimsky
On 10/5/07, Andrew WC Brown <[EMAIL PROTECTED]> wrote: > Well I think my biggest problem I was having was the fact that my before > block was: > > def before > end > > instead of > > before do > end D'oh - can't believe I missed that. > > So I think its working, although my mock is complaini

Re: [rspec-users] spec'ing view render partial collection, local variable not found

2007-10-05 Thread Andrew WC Brown
Well I think my biggest problem I was having was the fact that my before block was: def before end instead of before do end So I think its working, although my mock is complaining now: before do game = mock_model(Game, :name => 'The Battle for Blaze', :salt_grains => 500,

Re: [rspec-users] spec'ing view render partial collection, local variable not found

2007-10-05 Thread David Chelimsky
On 10/5/07, David Chelimsky <[EMAIL PROTECTED]> wrote: > On 10/5/07, Andrew WC Brown <[EMAIL PROTECTED]> wrote: > > Well when I saw that originally thats what I thought the response was > > suppose to come after the render but: > > > > ActionView::ActionViewError in '/games/_game.rhtml should show

Re: [rspec-users] spec'ing view render partial collection, local variable not found

2007-10-05 Thread David Chelimsky
On 10/5/07, Andrew WC Brown <[EMAIL PROTECTED]> wrote: > Well when I saw that originally thats what I thought the response was > suppose to come after the render but: > > ActionView::ActionViewError in '/games/_game.rhtml should show game name' > No rhtml, rxml, rjs or delegate template found for /

Re: [rspec-users] spec'ing view render partial collection, local variable not found

2007-10-05 Thread Andrew WC Brown
Well when I saw that originally thats what I thought the response was suppose to come after the render but: ActionView::ActionViewError in '/games/_game.rhtml should show game name' No rhtml, rxml, rjs or delegate template found for //_game in /Volumes/EXTERNAL/web/omenking.ca/config/../app/views

Re: [rspec-users] spec'ing view render partial collection, local variable not found

2007-10-05 Thread David Chelimsky
On 10/5/07, Andrew WC Brown <[EMAIL PROTECTED]> wrote: > 1) > '/games/_game.rhtml should show game name' FAILED > expected /The Battle for Blaze/, got "" > ./spec/views/games/_game.rhtml_spec.rb:39: > > def before > game_1 = mock_model(Game, > :name => 'The Battle for Blaze', > :s

Re: [rspec-users] spec'ing view render partial collection, local variable not found

2007-10-05 Thread Andrew WC Brown
1) '/games/_game.rhtml should show game name' FAILED expected /The Battle for Blaze/, got "" ./spec/views/games/_game.rhtml_spec.rb:39: def before game_1 = mock_model(Game, :name => 'The Battle for Blaze', :salt_grains => 500, :people => 500, :days => nil,

Re: [rspec-users] spec'ing view render partial collection, local variable not found

2007-10-05 Thread David Chelimsky
On 10/5/07, Andrew WC Brown <[EMAIL PROTECTED]> wrote: > I'm trying to spec out a render partial collection but I get the following > error > > 2) > NoMethodError in '/games/_game.rhtml should show game name' > undefined method `body' for #<#:0x2f1154c> > /Volumes/EXTERNAL/web/omenking.ca/vendor/pl

[rspec-users] spec'ing view render partial collection, local variable not found

2007-10-05 Thread Andrew WC Brown
I'm trying to spec out a render partial collection but I get the following error 2) NoMethodError in '/games/_game.rhtml should show game name' undefined method `body' for #<#:0x2f1154c> /Volumes/EXTERNAL/web/omenking.ca/vendor/plugins/rspec_on_rails/lib/spec/rails/matchers/have_text.rb:12:in `mat