Sha256: d2163395d702dbaaa80d83aefcca3861ca04293670ac0768b0ad65e074d71e64

Contents?: true

Size: 584 Bytes

Versions: 11

Compression:

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

11 entries across 11 versions & 1 rubygems

Version Path
padrino-gen-0.9.6 lib/padrino-gen/generators/components/mocks/mocha_gen.rb
padrino-gen-0.9.5 lib/padrino-gen/generators/components/mocks/mocha_gen.rb
padrino-gen-0.9.4 lib/padrino-gen/generators/components/mocks/mocha_gen.rb
padrino-gen-0.9.3 lib/padrino-gen/generators/components/mocks/mocha_gen.rb
padrino-gen-0.9.2 lib/padrino-gen/generators/components/mocks/mocha_gen.rb
padrino-gen-0.9.1 lib/padrino-gen/generators/components/mocks/mocha_gen.rb
padrino-gen-0.9.0 lib/padrino-gen/generators/components/mocks/mocha_gen.rb
padrino-gen-0.8.5 lib/padrino-gen/generators/components/mocks/mocha_gen.rb
padrino-gen-0.8.4 lib/padrino-gen/generators/components/mocks/mocha_gen.rb
padrino-gen-0.8.3 lib/padrino-gen/generators/components/mocks/mocha_gen.rb
padrino-gen-0.8.2 lib/padrino-gen/generators/components/mocks/mocha_gen.rb