Sha256: 653bda69f231c0df81417ef82edd4fcf74e889aed439d6356cdbbaebe5fe1c1f

Contents?: true

Size: 576 Bytes

Versions: 2

Compression:

Stored size: 576 Bytes

Contents

module Padrino
  module Generators
    module Components
      module Mocks

        module MochaGen
          def setup_mock
            require_dependencies 'mocha', :group => 'test'
            case options[:test].to_s
              when 'rspec'
                inject_into_file 'spec/spec_helper.rb', "  conf.mock_with :mocha\n", :after => "Spec::Runner.configure do |conf|\n"
              else
                insert_mocking_include "Mocha::API"
            end
          end
        end # MochaGen
      end # Mocks
    end # Components
  end # Generators
end # Padrino

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
padrino-gen-0.9.9 lib/padrino-gen/generators/components/mocks/mocha_gen.rb
padrino-gen-0.9.7 lib/padrino-gen/generators/components/mocks/mocha_gen.rb