lib/gnawrnip/step_screenshot.rb in gnawrnip-0.3.0 vs lib/gnawrnip/step_screenshot.rb in gnawrnip-0.3.1

- old
+ new

@@ -1,15 +1,14 @@ -require 'base64' require 'turnip_formatter/step_template/exception' require 'gnawrnip/developer' module Gnawrnip class StepScreenshot < TurnipFormatter::StepTemplate::Exception on_failed :build - def self.scss - File.read(File.dirname(__FILE__) + '/gnawrnip.scss') + def self.css + File.read(File.dirname(__FILE__) + '/gnawrnip.css') end def build(example) images = example.metadata[:gnawrnip][:screenshot] @@ -44,18 +43,18 @@ </div> </div> EOS end - def single_image(path) + def single_image(file) text = '<div class="screenshot">' - text += develop([path]) + text += develop([file]) text + '</div>' end - def develop(paths) - paths.map do |path| - image = developer.develop(path) + def develop(files) + files.map do |file| + image = developer.develop(file.path) image.to_html end.join end def developer