From 0a3c37373c94819c6b5cbfa25f30ced1462cf8d8 Mon Sep 17 00:00:00 2001 From: Hailee Kenney Date: Fri, 13 Feb 2015 10:55:12 -0800 Subject: [PATCH] (maint) Update Gemfile to use rspec 2.14.0 Prior to this commit, the Gemfile for strings did not specify which version of rspec to use. When it started using rspec 3, the tests that relied upon the rspec-html-matchers gem began to fail, likely because that gem is not yet compatible with the new version of rspec. Update the Gemfile so that we explicitly use an older version of rspec to prevent tests from failing. We will have to either wait for rspec-html-matchers to catch up or find a new way of testing the HTML output before we can update to rspec 3. --- Gemfile | 4 ++-- spec/unit/puppet_x/puppetlabs/strings/pops_spec.rb | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Gemfile b/Gemfile index b37a722..4ee0853 100644 --- a/Gemfile +++ b/Gemfile @@ -10,11 +10,11 @@ puppetversion = ENV['PUPPET_VERSION'] if puppetversion gem 'puppet', puppetversion else - gem 'puppet', '~> 3.6.2' + gem 'puppet' end group :test do - gem 'rspec' + gem "rspec", "~> 2.14.0", :require => false gem 'mocha' gem 'puppetlabs_spec_helper' gem 'rspec-html-matchers' diff --git a/spec/unit/puppet_x/puppetlabs/strings/pops_spec.rb b/spec/unit/puppet_x/puppetlabs/strings/pops_spec.rb index 24e0193..d8ac5f2 100644 --- a/spec/unit/puppet_x/puppetlabs/strings/pops_spec.rb +++ b/spec/unit/puppet_x/puppetlabs/strings/pops_spec.rb @@ -21,18 +21,18 @@ describe PuppetX::PuppetLabs::Strings::Pops do let(:manifest_default) {"#hello world\nclass foo($bar = 3) { }"} let(:transformer) {PuppetX::PuppetLabs::Strings::Pops::YARDTransformer.new} - describe "transform method" do - it "should perform the correct transformation with parameter defaults" do + describe "transform method" do + it "should perform the correct transformation with parameter defaults" do model = parser.parse_string(manifest_default).current.definitions.first statements = transformer.transform(model) expect(statements.parameters[0][0].class).to be(PuppetX::PuppetLabs::Strings::Pops::YARDStatement) - end + end - it "should perform the correct transofmration without parameter defaults" do + it "should perform the correct transofmration without parameter defaults" do model = parser.parse_string(manifest).current.definitions.first statements = transformer.transform(model) expect(statements.parameters[0][1].class).to be(NilClass) - end + end end end end