Created
June 22, 2012 16:55
-
-
Save rbrancher/2973964 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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