(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.
This commit is contained in:
Hailee Kenney 2015-02-13 10:55:12 -08:00
parent 5257ca4bed
commit 0a3c37373c
2 changed files with 7 additions and 7 deletions

View File

@ -10,11 +10,11 @@ puppetversion = ENV['PUPPET_VERSION']
if puppetversion if puppetversion
gem 'puppet', puppetversion gem 'puppet', puppetversion
else else
gem 'puppet', '~> 3.6.2' gem 'puppet'
end end
group :test do group :test do
gem 'rspec' gem "rspec", "~> 2.14.0", :require => false
gem 'mocha' gem 'mocha'
gem 'puppetlabs_spec_helper' gem 'puppetlabs_spec_helper'
gem 'rspec-html-matchers' gem 'rspec-html-matchers'

View File

@ -21,18 +21,18 @@ describe PuppetX::PuppetLabs::Strings::Pops do
let(:manifest_default) {"#hello world\nclass foo($bar = 3) { }"} let(:manifest_default) {"#hello world\nclass foo($bar = 3) { }"}
let(:transformer) {PuppetX::PuppetLabs::Strings::Pops::YARDTransformer.new} let(:transformer) {PuppetX::PuppetLabs::Strings::Pops::YARDTransformer.new}
describe "transform method" do describe "transform method" do
it "should perform the correct transformation with parameter defaults" do it "should perform the correct transformation with parameter defaults" do
model = parser.parse_string(manifest_default).current.definitions.first model = parser.parse_string(manifest_default).current.definitions.first
statements = transformer.transform(model) statements = transformer.transform(model)
expect(statements.parameters[0][0].class).to be(PuppetX::PuppetLabs::Strings::Pops::YARDStatement) 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 model = parser.parse_string(manifest).current.definitions.first
statements = transformer.transform(model) statements = transformer.transform(model)
expect(statements.parameters[0][1].class).to be(NilClass) expect(statements.parameters[0][1].class).to be(NilClass)
end end
end end
end end
end end