-
-
Save pwnela/1e988cc051b69405877c 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 'rspec' | |
class List | |
attr_accessor :tasks | |
def initialize | |
@tasks = [] | |
end | |
def add_task(list_task) | |
tasks << list_task | |
end | |
end | |
class Task | |
attr_accessor :description | |
def initialize(description) | |
@description = description | |
end | |
end | |
describe 'to do list' do | |
it "adds a task to the to do list" do | |
list = List.new | |
task = Task.new("do stuff") | |
list.add_task(task) | |
list.tasks.include?(task).should == true | |
end | |
pending "removes a task from the do list" | |
pending "adds a deadline to a task" | |
pending "sets a priority for a task" | |
pending "marks a task as completed" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment