test/integration/docs_controller_test.rb in opro-0.3.0.pre1 vs test/integration/docs_controller_test.rb in opro-0.3.0.pre2

- old
+ new

@@ -1,14 +1,17 @@ require 'test_helper' class DocsControllerTest < ActiveSupport::IntegrationCase + DOCS_PATH = File.join(File.dirname(__FILE__), '../../app/views/opro/oauth/docs/markdown/*.md.erb') + test 'renders index' do visit oauth_docs_path assert_equal '/oauth_docs', current_path end test 'renders show' do - [:curl, :oauth, :quick_start].each do |doc| + Dir[DOCS_PATH].each do |file| + doc = file.split('/').last.gsub('.md.erb', '') doc_path = oauth_doc_path(:id => doc) visit doc_path assert_equal doc_path, current_path end end