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
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
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
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:
_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
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
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,
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
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 /
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
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
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,
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
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
14 matches
Mail list logo