Permalink
Browse files

Add a beginning spec for Pomo::Task

  • Loading branch information...
langhorst committed May 3, 2011
1 parent af3d46f commit da6dfa2e177c7ef0999382da1ba4f2db42e29e25
Showing with 40 additions and 0 deletions.
  1. +40 −0 spec/task_spec.rb
View
@@ -0,0 +1,40 @@
+
+require File.dirname(__FILE__) + '/spec_helper'
+
+describe Pomo::Task do
+ before :each do
+ @task = Pomo::Task.new('test task')
+ end
+
+ it "has a name" do
+ @task.name.should == 'test task'
+ end
+
+ it "has a default length" do
+ @task.length.should == 25
+ end
+
+ it "is not complete by default" do
+ @task.should_not be_complete
+ end
+
+ it "can change its name" do
+ @task.name = 'another task'
+ @task.name.should == 'another task'
+ end
+
+ it "can change its length" do
+ @task.length = 30
+ @task.length.should == 30
+ end
+
+ it "can be completed" do
+ @task.complete = true
+ @task.should be_complete
+ end
+
+ it "can be started" do
+ pending 'not sure how to spec the progress bar'
+ end
+end
+

0 comments on commit da6dfa2

Please sign in to comment.