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
|
describe 'home/index.html.haml' do
|
||||||
before do
|
before do
|
||||||
assign :playlists, [
|
assign :playlists, [
|
||||||
mock_model('Playlist', :name => 'Electro')
|
mock_model(Playlist, :name => 'Electro')
|
||||||
]
|
]
|
||||||
assign :tracks, [
|
assign :tracks, [
|
||||||
mock_model('Track', :name => 'Mega song')
|
mock_model(Track, :name => 'Mega song')
|
||||||
]
|
]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ require 'spec_helper'
|
|||||||
|
|
||||||
describe 'playlists/edit.html.haml' do
|
describe 'playlists/edit.html.haml' do
|
||||||
let(:playlist) do
|
let(:playlist) do
|
||||||
mock_model('Playlist').as_new_record.as_null_object
|
mock_model(Playlist).as_new_record.as_null_object
|
||||||
end
|
end
|
||||||
|
|
||||||
before do
|
before do
|
||||||
|
@ -3,7 +3,7 @@ require 'spec_helper'
|
|||||||
describe 'playlists/index.html.haml' do
|
describe 'playlists/index.html.haml' do
|
||||||
before do
|
before do
|
||||||
assign :playlists, [
|
assign :playlists, [
|
||||||
mock_model('Playlist', :name => 'Electro')
|
mock_model(Playlist, :name => 'Electro')
|
||||||
]
|
]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ require 'spec_helper'
|
|||||||
|
|
||||||
describe 'playlists/new.html.haml' do
|
describe 'playlists/new.html.haml' do
|
||||||
let(:playlist) do
|
let(:playlist) do
|
||||||
mock_model('Playlist').as_new_record.as_null_object
|
mock_model(Playlist).as_new_record.as_null_object
|
||||||
end
|
end
|
||||||
|
|
||||||
before do
|
before do
|
||||||
|
@ -2,7 +2,7 @@ require 'spec_helper'
|
|||||||
|
|
||||||
describe 'tracks/new.html.haml' do
|
describe 'tracks/new.html.haml' do
|
||||||
let(:track) do
|
let(:track) do
|
||||||
mock_model('Track').as_new_record.as_null_object
|
mock_model(Track).as_new_record.as_null_object
|
||||||
end
|
end
|
||||||
|
|
||||||
before do
|
before do
|
||||||
|
@ -2,7 +2,7 @@ require 'spec_helper'
|
|||||||
|
|
||||||
describe 'users/new.html.haml' do
|
describe 'users/new.html.haml' do
|
||||||
let(:user) do
|
let(:user) do
|
||||||
mock_model('User').as_new_record.as_null_object
|
mock_model(User).as_new_record.as_null_object
|
||||||
end
|
end
|
||||||
|
|
||||||
before do
|
before do
|
||||||
|
Loading…
x
Reference in New Issue
Block a user