spec: test classes with the same name stomp each other
TestCourseApi is also defined in another API spec, with a different set of methods and mixins. So if you run both spec suites in the same process, you get errors. Change-Id: Iff4e0b4926882453821718072586b7ed02ed310a Reviewed-on: https://gerrit.instructure.com/29266 Tested-by: Jenkins <jenkins@instructure.com> Reviewed-by: Stanley Stuart <stanley@instructure.com> Product-Review: Brian Palmer <brianp@instructure.com> QA-Review: Brian Palmer <brianp@instructure.com>
This commit is contained in:
parent
7df93bbb42
commit
17f0e08203
|
@ -26,7 +26,6 @@ class TestCourseApi
|
|||
def api_user_content(syllabus, course); return "api_user_content(#{syllabus}, #{course.id})"; end
|
||||
end
|
||||
|
||||
|
||||
describe Api::V1::Course do
|
||||
|
||||
describe '#course_json' do
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
require File.expand_path(File.dirname(__FILE__) + '/../api_spec_helper')
|
||||
require File.expand_path(File.dirname(__FILE__) + '/../locked_spec')
|
||||
|
||||
class TestCourseApi
|
||||
class DiscussionTopicsTestCourseApi
|
||||
include Api
|
||||
include Api::V1::DiscussionTopics
|
||||
def feeds_topic_format_path(topic_id, code, format); "feeds_topic_format_path(#{topic_id.inspect}, #{code.inspect}, #{format.inspect})"; end
|
||||
|
@ -29,7 +29,7 @@ end
|
|||
|
||||
describe Api::V1::DiscussionTopics do
|
||||
before do
|
||||
@test_api = TestCourseApi.new
|
||||
@test_api = DiscussionTopicsTestCourseApi.new
|
||||
course_with_teacher(:active_all => true, :user => user_with_pseudonym)
|
||||
@me = @user
|
||||
student_in_course(:active_all => true, :course => @course)
|
||||
|
|
Loading…
Reference in New Issue