Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Project Spec Rspec test
require 'spec_helper'
describe Project do
context "while starting up" do
before do
options = {
name: 'Building house',
priority: 2,
tasks: []
}
@project = Project.new(options)
end
it "has a name" do
expect(@project.name).to include('Building house')
end
it "has zero tasks" do
@project.tasks.should be_empty
end
end
context "manipulating projects" do
before do
options1 = {
name: 'Building house',
priority: 2,
tasks: []
}
options2 = {
name: 'Getting a loan from the Bank',
priority: 3,
tasks: []
}
@project1 = Project.new(options1)
@project2 = Project.new(options2)
end
it "has to return more than 0 projects" do
Project.count.should be > 0
end
it "can print all projects" do
Project.all.should eq([@project1, @project2])
end
end
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.