Skip to content

@pwnela /to-do.rb secret

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
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
Something went wrong with that request. Please try again.