green_day 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 11c63d51a8f35f37def1b02e9c086f8d949c533d5ab52a37fd96bcb060cff4bf
4
- data.tar.gz: 7aa09714d46b3eb9421dc474b7e390e7164629e6963dcdaaff789fe2eccd19b7
3
+ metadata.gz: 0fb303ceba54c7b5585ffaed2dba8a9a7edecfee68b59959df974232d862523e
4
+ data.tar.gz: 4fc51ebca94c8723c6f2781abd3937cbf428c56e371617736832d2f12e215233
5
5
  SHA512:
6
- metadata.gz: 99fc8237b043f932d76424feefec441e756e4516e6dfe0d7d965db16c60045c91d0d298e382614859e4a325f505737c4759ca0646f93c8f6023e7713538e5e38
7
- data.tar.gz: e12d333418eff9f24ad6111472bb91a57120b2a1c7c596c244ab98855ced8ab744aae953e3429aa7fd28856d2d1d86c77c8f19e8c82cba7c20adaa8274541aab
6
+ metadata.gz: c737e153a711c5bffee4938df8d63a2ea15397411b1c6c09b289eb2af43b0e8ff3312d5e3c76de7be6ca3b70e3587d8b293d6c241c0ccf8f992c3702d023410a
7
+ data.tar.gz: d798edaf3d568a90e29424e9e1595a1bcc24e206accfaad63b12c6f6692382a6495abd5d0f5fb21b4f4d48e445feeb23c36d638c12158b3b794606a437817f29
data/README.md CHANGED
@@ -52,28 +52,31 @@ For example
52
52
  Example of output spec
53
53
 
54
54
  ```ruby
55
- require 'rspec'
56
-
57
- RSpec.describe 'test' do
58
- it 'test with "2 900\n"' do
59
- io = IO.popen("ruby abc150/A.rb", "w+")
60
- io.puts("2 900\n")
61
- expect(io.gets).to eq("Yes\n")
62
- end
63
-
64
- it 'test with "1 501\n"' do
65
- io = IO.popen("ruby abc150/A.rb", "w+")
66
- io.puts("1 501\n")
67
- expect(io.gets).to eq("No\n")
68
- end
69
-
70
- it 'test with "4 2000\n"' do
71
- io = IO.popen("ruby abc150/A.rb", "w+")
72
- io.puts("4 2000\n")
73
- expect(io.gets).to eq("Yes\n")
74
- end
75
-
55
+ require 'rspec'
56
+
57
+ RSpec.describe 'test' do
58
+ it 'test with "2 900\\n"' do
59
+ io = IO.popen("ruby abc150/A.rb", "w+")
60
+ io.puts("2 900\\n")
61
+ io.close_write
62
+ expect(io.readlines.join).to eq("Yes\\n")
76
63
  end
64
+
65
+ it 'test with "1 501\\n"' do
66
+ io = IO.popen("ruby abc150/A.rb", "w+")
67
+ io.puts("1 501\\n")
68
+ io.close_write
69
+ expect(io.readlines.join).to eq("No\\n")
70
+ end
71
+
72
+ it 'test with "4 2000\\n"' do
73
+ io = IO.popen("ruby abc150/A.rb", "w+")
74
+ io.puts("4 2000\\n")
75
+ io.close_write
76
+ expect(io.readlines.join).to eq("Yes\\n")
77
+ end
78
+
79
+ end
77
80
  ```
78
81
 
79
82
  ## Development
@@ -19,7 +19,8 @@ module GreenDay
19
19
  #{tab}it 'test with #{unify_cr_lf(input)}' do
20
20
  #{tab}#{tab}io = IO.popen("ruby #{answer.path}", "w+")
21
21
  #{tab}#{tab}io.puts(#{unify_cr_lf(input)})
22
- #{tab}#{tab}expect(io.gets).to eq(#{unify_cr_lf(output)})
22
+ #{tab}#{tab}io.close_write
23
+ #{tab}#{tab}expect(io.readlines.join).to eq(#{unify_cr_lf(output)})
23
24
  #{tab}end
24
25
  SPEC
25
26
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module GreenDay
4
- VERSION = '0.1.4'
4
+ VERSION = '0.1.5'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: green_day
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - qwyng
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-02-11 00:00:00.000000000 Z
11
+ date: 2020-02-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday