This repository has been archived by the owner on Mar 12, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
robmckinnon
committed
Apr 24, 2008
1 parent
94e9327
commit dedc03f
Showing
5 changed files
with
31 additions
and
3 deletions.
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,32 @@ | ||
require File.dirname(__FILE__) + '/../spec_helper' | ||
require File.dirname(__FILE__) + '/model_spec_helper' | ||
|
||
describe Question do | ||
|
||
it 'should belong to an answer' do | ||
assert_model_belongs_to Question, :answer | ||
end | ||
|
||
end | ||
|
||
describe Question, 'when loading' do | ||
|
||
include ModelSpecHelper | ||
|
||
it 'should ignore unneeded attribute' do | ||
lambda { Question.create_from(:title => 'title') }.should_not raise_error | ||
end | ||
|
||
it 'should load member' do | ||
assert_loads_attribute Question, :member | ||
end | ||
|
||
it 'should load uin' do | ||
assert_loads_attribute Question, :uin | ||
end | ||
|
||
it 'should load text' do | ||
assert_loads_attribute Question, :text | ||
end | ||
|
||
end |
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