Sha256: f388d38cfcc1211869356783bd1411c7888213cba224fce644fa90460baea329

Contents?: true

Size: 1.03 KB

Versions: 2

Compression:

Stored size: 1.03 KB

Contents

lib_path = File.expand_path(File.dirname(__FILE__) + "/../lib")
$LOAD_PATH.unshift lib_path unless $LOAD_PATH.include?(lib_path)

require 'micronaut/rails/version'
gem "spicycode-micronaut", Micronaut::Rails::Version::MICRONAUT_REQUIRED_VERSION
require 'micronaut'
require 'micronaut-rails'
require 'rubygems'
gem :mocha

module Micronaut  
  module Matchers
    def fail
      raise_error(::Micronaut::Expectations::ExpectationNotMetError)
    end

    def fail_with(message)
      raise_error(::Micronaut::Expectations::ExpectationNotMetError, message)
    end
  end
end

def remove_last_describe_from_world
  Micronaut.world.behaviours.pop
end

class DummyFormatter <  Micronaut::Formatters::BaseTextFormatter; end

def dummy_reporter
  DummyFormatter.new({}, StringIO.new)
end

def use_color?
  !ENV.has_key?('TM_MODE')
end

Micronaut.configure do |config|
  config.mock_with :mocha
  config.color_enabled = use_color?
  config.formatter = :documentation
  config.profile_examples = false
  config.filter_run :focused => true
  config.autorun!
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
spicycode-micronaut-rails-0.0.6.1 examples/example_helper.rb
spicycode-micronaut-rails-0.0.6.2 examples/example_helper.rb