-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.rb
executable file
·32 lines (26 loc) · 968 Bytes
/
test.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
#!/usr/bin/env ruby
require './storage'
require './app'
# require 'pry'
# This is for test purpose
def test
app = App.new
app.clear_data
app.create_book(title: 'wdv', author: 'vwevw')
app.create_book(title: 'wdv', author: 'vwevw')
app.create_book(title: 'wdv', author: 'vwevw')
app.create_student(id: nil, age: 24, name: 'ced', parent_permission: true, classroom: nil)
app.create_student(id: nil, age: 26, name: 'cedric', parent_permission: true, classroom: nil)
app.create_student(id: nil, age: 30, name: 'Max', parent_permission: true, classroom: nil)
app.create_teacher(id: nil, specialization: 'Math', age: 20, name: 'Life', parent_permission: false)
app.create_teacher(id: nil, specialization: 'Info', age: 27, name: 'Lijbkfe', parent_permission: false)
storage = Storage.new
storage.prepare_storage
storage.save_all_data(app)
storage.load_data(app)
# binding.pry
# storage.load_books
# puts(file_2)
end
test
# binding.pry