-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Jack Chester Solutions #53
base: master
Are you sure you want to change the base?
Conversation
end | ||
|
||
def add_apples | ||
(1..10).each do |idx| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you also do something like this...
10.times { @apples.push Apple.new("Red", rand(4..6)) }
I'd assume the diameter would have less of a variance :)
end | ||
|
||
it 'ages one year' do | ||
expect(testTree.age).to eq(1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2 spaces
@@ -1,14 +1,66 @@ | |||
require 'rspec' | |||
require 'tree' | |||
|
|||
testTree = Tree.new | |||
|
|||
describe 'Tree' do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
describe Tree do
will work.
Then you can do stuff like described_class.new.age!
or even subject { described_class.new }
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also check this out... www.betterspecs.org/#let
end | ||
end | ||
|
||
describe 'Fruit' do | ||
it 'is a Class' do | ||
expect(Fruit.is_a? Class).to be true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2 spaces
@jaybobo @matt529