From 3edf7347df1b4019e74a9faa0a39754769d45b88 Mon Sep 17 00:00:00 2001 From: Hailee Kenney Date: Mon, 6 Jul 2015 11:55:59 -0700 Subject: [PATCH] (maint) Remove rspec-html-matchers from acceptance Prior to this commit, the acceptance tests were using the rspec-html-matchers gem which we had removed because it does not work with rspec 3. In order to make the acceptance tests compatible with this change, use string matching to check the HTML output instead and remove the dependency on that gem. --- spec/acceptance/running_strings_yardoc.rb | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/spec/acceptance/running_strings_yardoc.rb b/spec/acceptance/running_strings_yardoc.rb index 3505185..38b9fd4 100644 --- a/spec/acceptance/running_strings_yardoc.rb +++ b/spec/acceptance/running_strings_yardoc.rb @@ -1,5 +1,4 @@ require 'spec_helper_acceptance' -require 'rspec-html-matchers' require 'json' describe 'Genearting module documation using yardoc action' do @@ -16,14 +15,14 @@ describe 'Genearting module documation using yardoc action' do end it "should generate documentation for manifests" do - expect(read_file_on(master, '/root/doc/test.html')).to have_tag('.docstring .discussion', :text => /This class/) + expect(read_file_on(master, '/root/doc/test.html')).to include("Class: test") end it "should generate documenation for 3x functions" do - expect(read_file_on(master, '/root/doc/Puppet3xFunctions.html')).to have_tag('.docstring .discussion', :text => /documentation for `function3x`/) + expect(read_file_on(master, '/root/doc/Puppet3xFunctions.html')).to include("This is the function documentation for `function3x`") end it "should generate documenation for 4x functions" do - expect(read_file_on(master, '/root/doc/Puppet4xFunctions.html')).to have_tag('.docstring .discussion', :text => /This is a function/) + expect(read_file_on(master, '/root/doc/Puppet4xFunctions.html')).to include("This is a function which is used to test puppet strings") end end