Sha256: 3f0c981daa208e867c1094a6a1c9bfe9509937eff05ef58a2ebb5d6d2dba62b7

Contents?: true

Size: 432 Bytes

Versions: 10

Compression:

Stored size: 432 Bytes

Contents

module RailsStubs
  # Setup fake `Rails.root`
  def stub_rails_root(path='./spec/fixtures')
    Rails.stub(:root).and_return(Pathname.new(path))
  end

  # Setup fake `Rails.env`
  def stub_rails_env(env='development')
    Rails.stub(:env).and_return(env)
  end

  def stub_rails_application
    application_double = double("application", :eager_load! => true)

    Rails.stub(:application).and_return(application_double)
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
sprig-reap-0.3.0 spec/support/rails_stubs.rb
sprig-reap-0.2.0 spec/support/rails_stubs.rb
sprig-reap-0.1.0 spec/support/rails_stubs.rb
sprig-reap-0.0.10 spec/support/rails_stubs.rb
sprig-reap-0.0.9 spec/support/rails_stubs.rb
sprig-reap-0.0.8 spec/support/rails_stubs.rb
sprig-reap-0.0.7 spec/support/rails_stubs.rb
sprig-reap-0.0.6 spec/support/rails_stubs.rb
sprig-reap-0.0.5 spec/support/rails_stubs.rb
sprig-reap-0.0.4 spec/support/rails_stubs.rb