lib/rspec.rb in whirlwind-0.1.2 vs lib/rspec.rb in whirlwind-0.1.3
- old
+ new
@@ -5,10 +5,15 @@
BASE = File.expand_path(File.dirname(__FILE__) + '/..')
define_method('screen_shot') { |i='No Description Provided'|
file = "#{BASE}/images/#{Token.provide}.jpg"
FileUtils.mkdir File.dirname(file) unless File.directory?(File.dirname(file))
@__cucumber_step_mother.add_image(:src => file, :label => i)
- Watir::Screen.shot.resize(800, 600).write(file)
+
+ if RUBY_PLATFORM =~ /win/i or RUBY_PLATFORM =~ /mingw/i
+ Watir::Screen.shot.write(file)
+ else
+ Watir::Screen.shot.resize(800, 600).write(file)
+ end
}
define_method('site_requires') {
Find.find(BASE + '/sites').each { |i|
require i if i =~ /\.rb$/ && !File.directory?(i) && i !~ /\/features\//
}