Call mock_model with the class name instead of a string
This commit is contained in:
parent
abb7b07c89
commit
72f800397d
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user