Sha256: 79aaf26c33bdbd69aae82aa746d28a36c468744697768c33c91dfb042438d77d

Contents?: true

Size: 578 Bytes

Versions: 1

Compression:

Stored size: 578 Bytes

Contents

def setup_mock
  require_dependencies 'rr', :group => 'test'
  case options[:test].to_s
    when 'rspec'
      inject_into_file 'spec/spec_helper.rb', "  conf.mock_with :rr\n", :after => "RSpec.configure do |conf|\n"
    when 'rspec1'
      inject_into_file 'spec/spec_helper.rb', "  conf.mock_with :rr\n", :after => "Spec::Runner.configure do |conf|\n"
    when 'riot'
      inject_into_file "test/test_config.rb","require 'riot/rr'\n", :after => "\"/../config/boot\")\n"
    else
      insert_mocking_include "RR::Adapters::RRMethods", :path => "test/test_config.rb"
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
padrino-gen-0.9.19 lib/padrino-gen/generators/components/mocks/rr.rb