Created
November 4, 2008 22:18
-
-
Save quinn/22233 to your computer and use it in GitHub Desktop.
This file contains 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 File.dirname(__FILE__) + '/../spec_helper' | |
describe 'a band\'s preferences' do | |
fixtures :groups, :users, :emails | |
before(:each) do | |
@band = groups(:pfunk) | |
@band.should be_is_a Band # pref definition is in band | |
@band.class.base_class.should == Group # base class is group | |
end | |
it 'should include prefers_private_songs' do | |
@band.should respond_to(:prefers_private_songs) | |
end | |
describe 'should include prefers_private_songs which' do | |
it 'should default to false' do | |
@band.prefers_private_songs.should == false | |
end | |
# spec fails with | |
# undefined method `preference_definitions' for #<Class:0x37b3a4c> | |
it 'should be settable' do | |
@band.prefers_private_songs= true | |
@band.save! | |
@band.reload.prefers_private_songs.should == true | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment