Sha256: be93410c6ecf0e6345f18ef24a2c724c157c3edf62292f52b39a7ab3694c7124
Contents?: true
Size: 577 Bytes
Versions: 61
Compression:
Stored size: 577 Bytes
Contents
module RSpec module Helpers def fake_stdin(strings) InputFaker.with_fake_input(strings) { yield } end def invoke(object, *args) object.class.send(:start, args.map { |arg| arg.to_s }) end def green(string) "\e[32m#{string}\e[0m" end def red(string) "\e[31m#{string}\e[0m" end def yellow(string) "\e[0;33m#{string}\e[0m" end def hooks(model, method) model.class.hooks.inject([]) do |result, v| result << v[0] if v[1][:only].include?(method) result end end end end
Version data entries
61 entries across 61 versions & 1 rubygems