From 72f800397d37041dfe8e2db319ef503432c3638d Mon Sep 17 00:00:00 2001 From: Thibault Jouan Date: Tue, 20 Sep 2011 23:27:48 +0000 Subject: [PATCH] Call mock_model with the class name instead of a string --- spec/views/home/index.html.haml_spec.rb | 4 ++-- spec/views/playlists/edit.html.haml_spec.rb | 2 +- spec/views/playlists/index.html.haml_spec.rb | 2 +- spec/views/playlists/new.html.haml_spec.rb | 2 +- spec/views/tracks/new.html.haml_spec.rb | 2 +- spec/views/users/new.html.haml_spec.rb | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/spec/views/home/index.html.haml_spec.rb b/spec/views/home/index.html.haml_spec.rb index b19f80f..caaebe8 100644 --- a/spec/views/home/index.html.haml_spec.rb +++ b/spec/views/home/index.html.haml_spec.rb @@ -3,10 +3,10 @@ require 'spec_helper' describe 'home/index.html.haml' do before do assign :playlists, [ - mock_model('Playlist', :name => 'Electro') + mock_model(Playlist, :name => 'Electro') ] assign :tracks, [ - mock_model('Track', :name => 'Mega song') + mock_model(Track, :name => 'Mega song') ] end diff --git a/spec/views/playlists/edit.html.haml_spec.rb b/spec/views/playlists/edit.html.haml_spec.rb index 050d4c8..9415445 100644 --- a/spec/views/playlists/edit.html.haml_spec.rb +++ b/spec/views/playlists/edit.html.haml_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' describe 'playlists/edit.html.haml' do let(:playlist) do - mock_model('Playlist').as_new_record.as_null_object + mock_model(Playlist).as_new_record.as_null_object end before do diff --git a/spec/views/playlists/index.html.haml_spec.rb b/spec/views/playlists/index.html.haml_spec.rb index af2db4c..ad06eb7 100644 --- a/spec/views/playlists/index.html.haml_spec.rb +++ b/spec/views/playlists/index.html.haml_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper' describe 'playlists/index.html.haml' do before do assign :playlists, [ - mock_model('Playlist', :name => 'Electro') + mock_model(Playlist, :name => 'Electro') ] end diff --git a/spec/views/playlists/new.html.haml_spec.rb b/spec/views/playlists/new.html.haml_spec.rb index bef3839..e332494 100644 --- a/spec/views/playlists/new.html.haml_spec.rb +++ b/spec/views/playlists/new.html.haml_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' describe 'playlists/new.html.haml' do let(:playlist) do - mock_model('Playlist').as_new_record.as_null_object + mock_model(Playlist).as_new_record.as_null_object end before do diff --git a/spec/views/tracks/new.html.haml_spec.rb b/spec/views/tracks/new.html.haml_spec.rb index de3e856..695303e 100644 --- a/spec/views/tracks/new.html.haml_spec.rb +++ b/spec/views/tracks/new.html.haml_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' describe 'tracks/new.html.haml' do let(:track) do - mock_model('Track').as_new_record.as_null_object + mock_model(Track).as_new_record.as_null_object end before do diff --git a/spec/views/users/new.html.haml_spec.rb b/spec/views/users/new.html.haml_spec.rb index a9216cc..6744306 100644 --- a/spec/views/users/new.html.haml_spec.rb +++ b/spec/views/users/new.html.haml_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' describe 'users/new.html.haml' do let(:user) do - mock_model('User').as_new_record.as_null_object + mock_model(User).as_new_record.as_null_object end before do