time_span 0.0.2 → 0.0.3

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,3 +1,3 @@
1
1
  module TimeSpan
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
@@ -34,11 +34,36 @@ describe "TimeSpan" do
34
34
  timeline.spans << time_span
35
35
  end
36
36
 
37
-
38
37
  context "TimeSpan::TimeLine" do
39
38
 
40
39
  context "instance methods" do
41
40
 
41
+ context "cloning" do
42
+ it "should raise a NotImplementedError" do
43
+ lambda {
44
+ timeline.clone }.should raise_error NotImplementedError
45
+ end
46
+ end
47
+
48
+ context "equality comparator" do
49
+
50
+ ## two timelines are equal only if names are the same and they are empty.
51
+ it "should return == when all values are equal" do
52
+ timeline2 = TimeSpan::TimeLine.new "testing equality."
53
+ timeline3 = TimeSpan::TimeLine.new "testing equality."
54
+ timeline2.should == timeline3 #, "Not returning == when they are."
55
+ end
56
+
57
+ it "should return equal if all values are equal." do
58
+ timeline2 = TimeSpan::TimeLine.new "testing equality."
59
+ timeline3 = TimeSpan::TimeLine.new "testing equality."
60
+ relativet = TimeSpan::RelativeTime.new timeline2, "Some time point."
61
+ timeline2.append relativet
62
+ timeline2.should_not == timeline3
63
+ end
64
+
65
+ end
66
+
42
67
  context "statues" do
43
68
 
44
69
  it "should have non-empty endpoint statuses" do
@@ -187,6 +212,11 @@ describe "TimeSpan" do
187
212
 
188
213
  context "creation" do
189
214
 
215
+ it "should raise an error when trying to clone." do
216
+ lambda {
217
+ time_span.clone }.should raise_error NotImplementedError
218
+ end
219
+
190
220
  it "should have a timeline associated" do
191
221
  timeline.spans.should_not be_empty
192
222
  end
@@ -345,6 +375,11 @@ describe "TimeSpan" do
345
375
  TimeSpan::RelativeTime.new timeline, "time point"
346
376
  end
347
377
 
378
+ it "raises an error when trying to clone" do
379
+ lambda {
380
+ time.clone }.should raise_error NotImplementedError
381
+ end
382
+
348
383
  it "returns a string if using '.to_s'" do
349
384
  time.to_s.should == 'time point'
350
385
  end
@@ -9,7 +9,7 @@ Gem::Specification.new do |s|
9
9
  s.email = ["craig.a.cook@gmail.com"]
10
10
  s.homepage = "https://github.com/coyote/time_span"
11
11
  s.summary = %q{Time Span}
12
- s.description = %q{Time spans, including many comparators}
12
+ s.description = %q{Time spans, including many comparators. Abstract time ONLY.}
13
13
  s.license = 'MIT'
14
14
 
15
15
  s.rubyforge_project = "time_span"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: time_span
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-03-02 00:00:00.000000000 Z
12
+ date: 2012-03-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
16
- requirement: &73419500 !ruby/object:Gem::Requirement
16
+ requirement: &76370530 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,8 +21,8 @@ dependencies:
21
21
  version: '0'
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *73419500
25
- description: Time spans, including many comparators
24
+ version_requirements: *76370530
25
+ description: Time spans, including many comparators. Abstract time ONLY.
26
26
  email:
27
27
  - craig.a.cook@gmail.com
28
28
  executables: []