cellular_map 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -17,7 +17,7 @@ module CellularMap
17
17
  @y = y.to_i
18
18
  @map = map
19
19
  end
20
-
20
+
21
21
  # Cell's content.
22
22
  def content
23
23
  @map.store[[x, y]]
@@ -29,6 +29,7 @@ module CellularMap
29
29
  end
30
30
 
31
31
  def ==(other) # :nodoc:
32
+ self.class == other.class &&
32
33
  [@x, @y, @map] == [other.x, other.y, other.map]
33
34
  end
34
35
 
data/test/test_cell.rb CHANGED
@@ -16,6 +16,11 @@ class TestCell < Test::Unit::TestCase
16
16
  should("be different from another cell") {
17
17
  assert_not_equal @map[3, 19], @cell }
18
18
 
19
+ should("be different from something else entirely") {
20
+ assert_not_equal :something_else_entirely, @cell
21
+ assert_not_equal 15, @cell
22
+ }
23
+
19
24
  context("once filled") {
20
25
  setup { @cell.content = "anything" }
21
26
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cellular_map
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michel Belleville