class Specter::Test

Attributes

pathname[R]

Public Class Methods

new(pathname) click to toggle source
# File lib/rails/specter/application/app/models/specter/test.rb, line 4
def initialize(pathname)
  @pathname = pathname
end

Public Instance Methods

expected() click to toggle source
# File lib/rails/specter/application/app/models/specter/test.rb, line 12
def expected
  File.open(@pathname + "expected.html").read
end
input() click to toggle source
# File lib/rails/specter/application/app/models/specter/test.rb, line 8
def input
  File.open(@pathname + "input.html").read
end
test() click to toggle source
# File lib/rails/specter/application/app/models/specter/test.rb, line 16
def test
  File.open(@pathname + "test.js").read
end
valid?() click to toggle source
# File lib/rails/specter/application/app/models/specter/test.rb, line 20
def valid?
  File.exist?(@pathname + "input.html") &&
  File.exist?(@pathname + "expected.html") &&
  File.exist?(@pathname + "test.js")
end