Sha256: 3e6dee6ca041067d022588c8e357cc74e7cb1c73dcfbb0b2011600bc10b62499
Contents?: true
Size: 659 Bytes
Versions: 4
Compression:
Stored size: 659 Bytes
Contents
require 'spec_helper' module Landable describe Theme do it { should have_valid(:thumbnail_url).when(nil) } it { should be_a HasAssets } describe '#most_used_theme' do it 'returns the most used theme' do t = create :theme t2 = create :theme t3 = create :theme create :page, theme: t create :page, theme: t create :page, theme: t2 create :page, theme: t Theme.most_used_on_pages.should == t end it 'return nil when there are no themes' do Theme.destroy_all # Remove all themes! Theme.most_used_on_pages.should be_nil end end end end
Version data entries
4 entries across 4 versions & 1 rubygems