Sha256: bca129d6d14de049fdfd9b8c7eee8d42756a253925db357955f85894d8aa89bb

Contents?: true

Size: 459 Bytes

Versions: 24

Compression:

Stored size: 459 Bytes

Contents

def setup_mock
  require_dependencies 'mocha', :group => 'test', :require => false
  case options[:test].to_s
    when 'rspec'
      inject_into_file 'spec/spec_helper.rb', "  conf.mock_with :mocha\n", :after => "RSpec.configure do |conf|\n"
    else
      inject_into_file 'test/test_config.rb', "require 'mocha/api'\n", :after => "require File.expand_path(File.dirname(__FILE__) + \"/../config/boot\")\n"
      insert_mocking_include "Mocha::API"
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
padrino-gen-0.16.0.pre3 lib/padrino-gen/generators/components/mocks/mocha.rb
padrino-gen-0.16.0.pre2 lib/padrino-gen/generators/components/mocks/mocha.rb
padrino-gen-0.15.3 lib/padrino-gen/generators/components/mocks/mocha.rb
padrino-gen-0.15.2 lib/padrino-gen/generators/components/mocks/mocha.rb
padrino-gen-0.15.1 lib/padrino-gen/generators/components/mocks/mocha.rb
padrino-gen-0.15.0 lib/padrino-gen/generators/components/mocks/mocha.rb
padrino-gen-0.14.4 lib/padrino-gen/generators/components/mocks/mocha.rb
padrino-gen-0.14.3 lib/padrino-gen/generators/components/mocks/mocha.rb
padrino-gen-0.12.9 lib/padrino-gen/generators/components/mocks/mocha.rb
padrino-gen-0.14.2 lib/padrino-gen/generators/components/mocks/mocha.rb
padrino-gen-0.13.3.4 lib/padrino-gen/generators/components/mocks/mocha.rb
padrino-gen-0.14.1.1 lib/padrino-gen/generators/components/mocks/mocha.rb
padrino-gen-0.14.1 lib/padrino-gen/generators/components/mocks/mocha.rb
padrino-gen-0.14.0.2 lib/padrino-gen/generators/components/mocks/mocha.rb
padrino-gen-0.14.0.1 lib/padrino-gen/generators/components/mocks/mocha.rb
padrino-gen-0.14.0 lib/padrino-gen/generators/components/mocks/mocha.rb
padrino-gen-0.14.0.rc2 lib/padrino-gen/generators/components/mocks/mocha.rb
padrino-gen-0.14.0.rc1 lib/padrino-gen/generators/components/mocks/mocha.rb
padrino-gen-0.13.3.3 lib/padrino-gen/generators/components/mocks/mocha.rb
padrino-gen-0.13.3.2 lib/padrino-gen/generators/components/mocks/mocha.rb