Class: HTMLRender::RenderTest::Result::ServerResult

Inherits:
Object
  • Object
show all
Defined in:
lib/html_render/render_test.rb

Overview

The portion of a result specific to an individual server

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(server, expected, actual) ⇒ ServerResult

Initializes the ServerResult.

Params:

server: name of the server
expected: Image we expected
actual: Image we got


18
19
20
21
22
# File 'lib/html_render/render_test.rb', line 18

def initialize(server, expected, actual)
  @server = server
  @expected = expected
  @actual = actual
end

Instance Attribute Details

#actualObject (readonly)

Returns the value of attribute actual.



10
11
12
# File 'lib/html_render/render_test.rb', line 10

def actual
  @actual
end

#expectedObject (readonly)

Returns the value of attribute expected.



10
11
12
# File 'lib/html_render/render_test.rb', line 10

def expected
  @expected
end

#serverObject (readonly)

Returns the value of attribute server.



10
11
12
# File 'lib/html_render/render_test.rb', line 10

def server
  @server
end

Instance Method Details

#differenceObject



28
29
30
# File 'lib/html_render/render_test.rb', line 28

def difference
  expected.difference(actual)
end

#pass?Boolean



24
25
26
# File 'lib/html_render/render_test.rb', line 24

def pass?
  actual == expected
end