Sha256: b8f75ba62802745d4112a493f3dccbb89414d3d5427ae3dcffeda10b60bc1993

Contents?: true

Size: 514 Bytes

Versions: 48

Compression:

Stored size: 514 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 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

48 entries across 48 versions & 1 rubygems

Version Path
shelly-0.0.57 spec/helpers.rb
shelly-0.0.56 spec/helpers.rb
shelly-0.0.55 spec/helpers.rb
shelly-0.0.55.pre spec/helpers.rb
shelly-0.0.54 spec/helpers.rb
shelly-0.0.53 spec/helpers.rb
shelly-0.0.52 spec/helpers.rb
shelly-0.0.51.pre spec/helpers.rb
shelly-0.0.51 spec/helpers.rb
shelly-0.0.50.pre2 spec/helpers.rb
shelly-0.0.50.pre spec/helpers.rb
shelly-0.0.50 spec/helpers.rb
shelly-0.0.49.pre spec/helpers.rb
shelly-0.0.49 spec/helpers.rb
shelly-0.0.48 spec/helpers.rb
shelly-0.0.48.pre4 spec/helpers.rb
shelly-0.0.48.pre3 spec/helpers.rb
shelly-0.0.48.pre2 spec/helpers.rb
shelly-0.0.48.pre spec/helpers.rb
shelly-0.0.47 spec/helpers.rb