Sha256: b5538cfff70d64d5ade65ee798da8d11e5782613f48712e41930dd23e3618320

Contents?: true

Size: 699 Bytes

Versions: 1

Compression:

Stored size: 699 Bytes

Contents

require 'open3'

module Everqueen
  class Test
    attr_reader :name, :suite

    def initialize(suite, name)
      @suite = suite
      @name = name.sub('js.coffee.erb', 'js').sub('js.coffee', 'js').sub('js.erb', 'js')
    end

    def root
      suite.root
    end

    def full_path
      File.join(root, Everqueen.test_dir, name)
    end

    alias_method :asset_path, :name

    def url
      "#{suite.mounted_at}/run/#{name}"
    end

    def passed?
      runner.passed?
    end

    def failure_messages
      runner.failure_messages
    end

    def exist?
      File.exist?(full_path)
    end

  protected

    def runner
      @runner ||= suite.runner.test_runner(self)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
everqueen-1.1.1 lib/everqueen/test.rb