mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-01 02:03:22 +00:00
Load rake task under test for all its specs
If you ran only the second spec without the first, the rake file wasn't loaded and the test failed.
This commit is contained in:
@@ -4,12 +4,14 @@ require 'spec_helper'
|
||||
require 'rake'
|
||||
|
||||
describe 'users.rake' do
|
||||
before(:all) do
|
||||
Rake.application.rake_require 'tasks/users'
|
||||
Rake::Task.define_task(:environment)
|
||||
end
|
||||
|
||||
describe ':remove_enterprise_limit' do
|
||||
context 'when the user exists' do
|
||||
it 'sets the enterprise_limit to the maximum integer' do
|
||||
Rake.application.rake_require 'tasks/users'
|
||||
Rake::Task.define_task(:environment)
|
||||
|
||||
max_integer = 2_147_483_647
|
||||
user = create(:user)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user