Permalink
Browse files

add more tests

  • Loading branch information...
1 parent 81801ff commit 9f0675a627a95ce5f4fcd3e7edcfe8f70656d059 @nov committed May 1, 2009
Showing with 14 additions and 6 deletions.
  1. +7 −3 spec/smartfm/model/notification_spec.rb
  2. +7 −3 spec/smartfm/model/sentence_spec.rb
@@ -1,7 +1,11 @@
require File.join(File.dirname(__FILE__), '..', '..', 'spec_helper')
-describe String do
- it "should respond to length" do
- "hoge".should respond_to(:length)
+matake_notifications = Smartfm::User.find('matake').notifications
+
+Smartfm::Notification::ATTRIBUTES.each do |attr|
+ describe Smartfm::Notification, "##{attr}" do
+ it "should be accessible" do
+ matake_notifications.first.should respond_to(attr)
+ end
end
end
@@ -1,7 +1,11 @@
require File.join(File.dirname(__FILE__), '..', '..', 'spec_helper')
-describe String do
- it "should respond to length" do
- "hoge".should respond_to(:length)
+smartest = Smartfm::Sentence.find(10828)
+
+Smartfm::Sentence::ATTRIBUTES.each do |attr|
+ describe Smartfm::Sentence, "##{attr}" do
+ it "should be accessible" do
+ smartest.should respond_to(attr)
+ end
end
end

0 comments on commit 9f0675a

Please sign in to comment.