spec/unit/rails/param_value_spec.rb in puppet-2.7.13 vs spec/unit/rails/param_value_spec.rb in puppet-2.7.14
- old
+ new
@@ -1,20 +1,15 @@
#!/usr/bin/env rspec
require 'spec_helper'
require 'puppet/rails'
-describe "Puppet::Rails::ParamValue", :if => Puppet.features.rails? do
- def column(name, type)
- ActiveRecord::ConnectionAdapters::Column.new(name, nil, type, false)
- end
-
+describe "Puppet::Rails::ParamValue", :if => can_use_scratch_database? do
before do
require 'puppet/rails/param_value'
+ setup_scratch_database
- name = stub 'param_name', :name => "foo"
-
# Stub this so we don't need access to the DB.
- Puppet::Rails::ParamValue.stubs(:columns).returns([column("value", "string")])
+ name = stub 'param_name', :name => "foo"
Puppet::Rails::ParamName.stubs(:find_or_create_by_name).returns(name)
end
describe "when creating initial parameter values" do
it "should return an array of hashes" do