mirror of
https://github.com/opf/openproject.git
synced 2026-06-14 03:30:14 +00:00
Move legacy specs under spec/legacy
Signed-off-by: Alex Coles <alex@alexbcoles.com>
This commit is contained in:
@@ -27,5 +27,5 @@
|
||||
# See doc/COPYRIGHT.rdoc for more details.
|
||||
#++
|
||||
|
||||
require File.expand_path('../../../test/object_daddy_helpers', __FILE__)
|
||||
require File.expand_path('../../../spec/legacy/support/object_daddy_helpers', __FILE__)
|
||||
World(ObjectDaddyHelpers)
|
||||
|
||||
@@ -115,10 +115,9 @@ namespace :spec do
|
||||
task legacy: %w(legacy:unit legacy:functional legacy:integration)
|
||||
namespace :legacy do
|
||||
%w(unit functional integration).each do |type|
|
||||
desc "Run the code examples in test/#{type}"
|
||||
desc "Run the code examples in spec/legacy/#{type}"
|
||||
RSpec::Core::RakeTask.new(type => 'spec:prepare') do |t|
|
||||
t.ruby_opts = '-I test'
|
||||
t.pattern = "test/#{type}/**/*_test.rb"
|
||||
t.pattern = "spec/legacy/#{type}/**/*_spec.rb"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -45,7 +45,7 @@ describe MessagesController, type: :controller do
|
||||
}
|
||||
|
||||
let(:filename) { 'testfile.txt' }
|
||||
let(:file) { File.open(Rails.root.join('test/fixtures/files', filename)) }
|
||||
let(:file) { File.open(Rails.root.join('spec/fixtures/files', filename)) }
|
||||
let(:uploaded_file) { ActionDispatch::Http::UploadedFile.new(tempfile: file, type: 'text/plain', filename: filename) }
|
||||
|
||||
before { allow(User).to receive(:current).and_return user }
|
||||
|
||||
@@ -889,7 +889,7 @@ describe WorkPackagesController, type: :controller do
|
||||
end
|
||||
|
||||
let(:filename) { 'testfile.txt' }
|
||||
let(:file) { File.open(Rails.root.join('test/fixtures/files', filename)) }
|
||||
let(:file) { File.open(Rails.root.join('spec/fixtures/files', filename)) }
|
||||
let(:uploaded_file) { ActionDispatch::Http::UploadedFile.new(tempfile: file, type: 'text/plain', filename: filename) }
|
||||
|
||||
describe '#create' do
|
||||
|
||||
Vendored
+13
-13
@@ -1,13 +1,13 @@
|
||||
Index: trunk/app/controllers/issues_controller.rb
|
||||
===================================================================
|
||||
--- trunk/app/controllers/issues_controller.rb (révision 1483)
|
||||
+++ trunk/app/controllers/issues_controller.rb (révision 1484)
|
||||
@@ -149,7 +149,7 @@
|
||||
attach_files(@issue, params[:attachments])
|
||||
flash[:notice] = 'Demande créée avec succès'
|
||||
Mailer.deliver_issue_add(@issue) if Setting.notified_events.include?('issue_added')
|
||||
- redirect_to :controller => 'issues', :action => 'show', :id => @issue, :project_id => @project
|
||||
+ redirect_to :controller => 'issues', :action => 'show', :id => @issue
|
||||
return
|
||||
end
|
||||
end
|
||||
Index: trunk/app/controllers/issues_controller.rb
|
||||
===================================================================
|
||||
--- trunk/app/controllers/issues_controller.rb (révision 1483)
|
||||
+++ trunk/app/controllers/issues_controller.rb (révision 1484)
|
||||
@@ -149,7 +149,7 @@
|
||||
attach_files(@issue, params[:attachments])
|
||||
flash[:notice] = 'Demande créée avec succès'
|
||||
Mailer.deliver_issue_add(@issue) if Setting.notified_events.include?('issue_added')
|
||||
- redirect_to :controller => 'issues', :action => 'show', :id => @issue, :project_id => @project
|
||||
+ redirect_to :controller => 'issues', :action => 'show', :id => @issue
|
||||
return
|
||||
end
|
||||
end
|
||||
@@ -1,2 +1,2 @@
|
||||
this is a text file for upload tests
|
||||
with multiple lines
|
||||
this is a text file for upload tests
|
||||
with multiple lines
|
||||
Vendored
Vendored
Vendored
Vendored
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user