Skip to content

Instantly share code, notes, and snippets.

@ngty
Created August 24, 2011 08:13
Show Gist options
  • Save ngty/1167552 to your computer and use it in GitHub Desktop.
Save ngty/1167552 to your computer and use it in GitHub Desktop.
Monkey patch to fix fuubar-cucumber @ https://github.com/martinciu/fuubar-cucumber/issues/9
# features/support/cucumber_fuubar_patch.rb
module Cucumber::Cli::Configuration::Patch
def self.included(base)
base.class_eval do
alias_method :_orig_formatter_class, :formatter_class
def formatter_class(format)
if format == 'Cucumber::Formatter::Fuubar'
require 'cucumber/formatter/fuubar'
Cucumber::Formatter::Fuubar
else
_orig_formatter_class(format)
end
end
end
end
end
Cucumber::Cli::Configuration.send(:include, Cucumber::Cli::Configuration::Patch)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment