class Watir::RSpec
Constants
- VERSION
Public Class Methods
active_record_loaded?()
click to toggle source
@private
# File lib/watir/rspec.rb, line 17 def active_record_loaded? defined? ActiveRecord::Base end
file_path(file_name, description=nil)
click to toggle source
Generate unique file path for the current spec. If the file will be created during that spec and spec fails then it will be shown automatically in the html report.
@param [String] file_name File name to be used for file.
Will be used as a part of the complete name.
@return [String] Absolute path for the unique file name. @raise [RuntimeError] when {Watir::RSpec::HtmlFormatter} is not in use.
# File lib/watir/rspec.rb, line 12 def file_path(file_name, description=nil) formatter.file_path(file_name, description) end
Private Class Methods
formatter()
click to toggle source
# File lib/watir/rspec.rb, line 23 def formatter @formatter ||= begin formatter = ::RSpec.configuration.formatters.find {|f| f.kind_of? Watir::RSpec::HtmlFormatter} unless formatter raise <<-EOF Watir::RSpec::HtmlFormatter is not set as a RSpec formatter. You need to add it into your spec_helper.rb file like this: RSpec.configure do |config| config.add_formatter('documentation') config.add_formatter(Watir::RSpec::HtmlFormatter) end EOF end formatter end end