-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathattribute-spec.rb
52 lines (43 loc) · 965 Bytes
/
attribute-spec.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
require './attribute'
describe Attribute do
test = Attribute.new
describe '#initialize' do
it 'should create the reader attribute' do
expect(test.reader).to eq "attr reader"
end
it 'should create the writer attribute' do
expect{test.writer}.to raise_error
end
it 'should create the accessor attribute' do
expect(test.both).to eq "attr accessor"
end
it 'should create a local neither variable' do
expect{test.local}.to raise_error
end
end
describe '#read' do
it 'should puts the value of reader' do
expect(test.read).to puts "attr reader"
end
it 'should puts the value of writer' do
end
it 'should puts the value of both' do
end
end
describe '#write' do
it 'should' do
end
end
describe '#reader' do
it 'should' do
end
end
describe '#writer' do
it 'should' do
end
end
describe '#both' do
it 'should' do
end
end
end