consadole_aggregator 0.1.9 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,53 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
- require_relative '../../spec_helper'
3
-
4
- include ConsadoleAggregator::Live
5
-
6
- describe Timeline do
7
- describe '.parse' do
8
- context 'given nil' do
9
- subject{ Timeline.parse(nil) }
10
- it{ should be_nil }
11
- end
12
- context 'given ""' do
13
- subject{ Timeline.parse("") }
14
- it{ should be_nil }
15
- end
16
- context 'given "<前半>"' do
17
- subject{ Timeline.parse('<前半>') }
18
- it{ should be_nil }
19
- end
20
- context 'given "1分 右サイドからボールをつながれ攻撃を仕掛けられるが札幌DFが落ち着いてクリア"' do
21
- subject{ Timeline.parse('1分 右サイドからボールをつながれ攻撃を仕掛けられるが札幌DFが落ち着いてクリア') }
22
- it{ should eql Timeline.new('1分', '右サイドからボールをつながれ攻撃を仕掛けられるが札幌DFが落ち着いてクリア') }
23
- end
24
- context 'given "5分"' do
25
- subject{ Timeline.parse('5分') }
26
- it{ should eql Timeline.new('5分', nil) }
27
- end
28
- end
29
- describe '#to_s' do
30
- before do
31
- @timeline = Timeline.new
32
- end
33
- context 'when empty' do
34
- subject{ @timeline.to_s }
35
- it{ should == '' }
36
- end
37
- context 'when only time' do
38
- before do
39
- @timeline.time = '1分'
40
- end
41
- subject{ @timeline.to_s }
42
- it{ should == '1分' }
43
- end
44
- context 'when filled time and post' do
45
- before do
46
- @timeline.time = '1分'
47
- @timeline.post = '右サイドからボールをつながれ攻撃を仕掛けられるが札幌DFが落ち着いてクリア'
48
- end
49
- subject{ @timeline.to_s }
50
- it{ should == '1分 右サイドからボールをつながれ攻撃を仕掛けられるが札幌DFが落ち着いてクリア' }
51
- end
52
- end
53
- end
data/spec/spec.opts DELETED
@@ -1 +0,0 @@
1
- --color