Sha256: 5de18b938b29bdce97f5840de5fc19d122c93cb8b18bb295f16f9bfc08e22052

Contents?: true

Size: 703 Bytes

Versions: 3

Compression:

Stored size: 703 Bytes

Contents

require 'rubygems'
require 'cucumber'
require 'celerity'

module Butternut
  def self.setup_hooks(obj)
    obj.instance_exec do
      AfterStep do |object|
        if object.is_a?(Cucumber::Ast::Scenario)
          if page_changed?
            object.last_page_source = current_page_source
            object.last_page_url    = current_url
          else
            object.last_page_source = nil
            object.last_page_url    = nil
          end
          @page_changed = false
        end
      end
    end
  end
end

require File.dirname(__FILE__) + "/butternut/scenario_extensions"
require File.dirname(__FILE__) + "/butternut/helpers"
require File.dirname(__FILE__) + "/butternut/formatter"

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
butternut-0.2.2-java lib/butternut.rb
butternut-0.2.1 lib/butternut.rb
butternut-0.2.0 lib/butternut.rb