Sha256: 594fc7d81d92934d1ce3d80ad2bd522ae48292ecef2f3cb462186403b274d514

Contents?: true

Size: 595 Bytes

Versions: 2

Compression:

Stored size: 595 Bytes

Contents

require 'pry'
require 'json'
require 'cucumber/blanket'

class FakePage
  attr_reader :coverage_data

  def initialize
    @coverage_data = parse_fixture_json
  end

  def parse_fixture_json
    json = File.read(File.join(File.dirname(__FILE__),'fixtures','simple.json'))
    return JSON.parse(json) # How it looks when we get it from Selenium
  end

  def evaluate_script script
    if script == "window.CUCUMBER_BLANKET"
      self.coverage_data
    elsif script == "window.CUCUMBER_BLANKET.done"
      true
    elsif script == "window.CUCUMBER_BLANKET.is_setup"
      true
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
cucumber-blanket-0.3.0 spec/spec_helper.rb
cucumber-blanket-0.2.0 spec/spec_helper.rb