spec/runner_results_spec.rb in puppet-doc-lint-0.1.1 vs spec/runner_results_spec.rb in puppet-doc-lint-0.2.0
- old
+ new
@@ -1,37 +1,76 @@
require 'spec_helper'
describe PuppetDocLint::DocRunner do
- file = 'spec/manifests/define_rdoc.pp'
- subject { setup(file) }
- it 'result should be an array of PuppetDocLint::Result' do
- subject.class.should be(Array)
- subject[0].class.should be(PuppetDocLint::Result)
- end
+ context 'define_rdoc' do
- it 'file name should be defined' do
- subject[0].file_name.should eql 'spec/manifests/define_rdoc.pp'
- end
-
- it 'class should be define_rdoc ' do
- subject[0].class_name.should eql 'define_rdoc'
- end
+ file = 'spec/manifests/define_rdoc.pp'
+ subject { setup(file) }
- it 'all parameters should be defined' do
- subject[0].parameters.should eql ["param_one", "param_two", "param_three", "param_four"]
- end
+ it 'result should be an array of PuppetDocLint::Result' do
+ subject.class.should be(Array)
+ subject[0].class.should be(PuppetDocLint::Result)
+ end
- it 'no documentation is nil' do
- subject[0].no_documentation.should be_false
- end
+ it 'file name should be defined' do
+ subject[0].file_name.should eql 'spec/manifests/define_rdoc.pp'
+ end
- it 'documented parameters' do
- subject[0].documented_parameters.should eql ["param_one"]
+ it 'class should be define_rdoc ' do
+ subject[0].class_name.should eql 'define_rdoc'
+ end
+
+ it 'all parameters should be defined' do
+ subject[0].parameters.should eql ["param_one", "param_two", "param_three", "param_four"]
+ end
+
+ it 'no documentation is nil' do
+ subject[0].no_documentation.should be_false
+ end
+
+ it 'documented parameters' do
+ subject[0].documented_parameters.should eql ["param_one"]
+ end
+
+ it 'undocumented_parameters parameters' do
+ subject[0].undocumented_parameters.should eql ["param_two", "param_three", "param_four"]
+ end
+
end
- it 'undocumented_parameters parameters' do
- subject[0].undocumented_parameters.should eql ["param_two", "param_three", "param_four"]
+ context 'define_rdoc' do
+ file = 'spec/manifests/nested_bullets.pp'
+ subject { setup(file) }
+
+ it 'result should be an array of PuppetDocLint::Result' do
+ subject.class.should be(Array)
+ subject[0].class.should be(PuppetDocLint::Result)
+ end
+
+ it 'file name should be defined' do
+ subject[0].file_name.should eql "spec/manifests/nested_bullets.pp"
+ end
+
+ it 'class should be foo' do
+ subject[0].class_name.should eql 'foo'
+ end
+
+ it 'all parameters should be defined' do
+ subject[0].parameters.should eql ["ensure"]
+ end
+
+ it 'no documentation is nil' do
+ subject[0].no_documentation.should be_false
+ end
+
+ it 'documented parameters' do
+ subject[0].documented_parameters.should eql ["ensure"]
+ end
+
+ it 'undocumented_parameters parameters' do
+ subject[0].undocumented_parameters.should eql []
+ end
end
end