Sha256: c47daee46f90a1c48a5420a6662e55f0eca7ddbd9084913d6aaba6a45459f299

Contents?: true

Size: 968 Bytes

Versions: 3

Compression:

Stored size: 968 Bytes

Contents

require 'rubygems'
require 'bundler/setup'

require 'combustion'

Combustion.path = 'spec/rails/stub_app'
Combustion.initialize! :action_controller,
                       :action_view

require 'rspec/rails'
require 'capybara/rspec'
require 'capybara/rails'

require 'spec_helper'

require 'rails/support/mock_person'

# Ensure that the rails plugin is installed
require 'arbo/rails'

Rails.application.routes.draw do
  get 'test/:action', controller: "test"
end

module AdditionalHelpers

  def protect_against_forgery?
    true
  end

  def form_authenticity_token(form_options: {})
    "AUTH_TOKEN"
  end

end

def mock_action_view(assigns = {})
  controller = ActionView::TestCase::TestController.new
  ActionView::Base.send :include, ActionView::Helpers
  ActionView::Base.send :include, AdditionalHelpers
  ActionView::Base.new(ActionController::Base.view_paths, assigns, controller)
end

RSpec.configure do |config|
  config.include Capybara::RSpecMatchers
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
arbo-1.3.1 spec/rails/rails_spec_helper.rb
arbo-1.3.0 spec/rails/rails_spec_helper.rb
arbo-1.2.0 spec/rails/rails_spec_helper.rb