Skip to content

Instantly share code, notes, and snippets.

@rbrancher
Created June 22, 2012 16:55
Show Gist options
  • Save rbrancher/2973964 to your computer and use it in GitHub Desktop.
Save rbrancher/2973964 to your computer and use it in GitHub Desktop.
require 'spec_helper'
describe 'publications/index' do
describe 'title' do
before do
%w(authors medias countries dates publications).each { |var| assign(var, []) }
end
it 'should set with author name' do
assign(:author, 'agnaldo farias')
view.should_receive(:title).with('agnaldo farias - publications | leonardo finotti')
end
it 'should set with media' do
assign(:media, 'arc design')
view.should_receive(:title).with('photos published at arc design | leonardo finotti')
end
it 'should set with country name' do
assign(:country, 'brazil')
view.should_receive(:title).with('brazil publications | leonardo finotti')
end
it 'should set with date' do
assign(:date, 1972)
view.should_receive(:title).with('publications from 1926 | leonardo finotti')
end
after { render }
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment