require_relative '../../../../spec_helper'

describe 'mongodb::configure_replica_set', :type => :class do
  let(:params) {{
    'members' => ['123.456.789.123', '987.654.321.012', '432.434.454.454:457'],
    'replicaset' => 'production',
  }}

  it {
    should contain_file('/etc/mongodb/configure-replica-set.js').with_content(
      /_id: "production"/)
  }
end

require_relative '../../../../spec_helper'

describe 'mongodb::configure_replica_set', :type => :class do
  describe 'production' do
    let(:params) {{
      'members' => ['123.456.789.123', '987.654.321.012', '432.434.454.454:457'],
      'replicaset' => 'production',
    }}

    it {
      should contain_file('/etc/mongodb/configure-replica-set.js').with_content(
        /_id: "production"/)
    }
  end

  describe 'development' do
    let(:params) {{
      'members' => ['123.456.789.123', '987.654.321.012', '432.434.454.454:457'],
      'replicaset' => 'development',
    }}

    it {
      should contain_file('/etc/mongodb/configure-replica-set.js').with_content(
        /_id: "development"/)
    }
  end
end

Add test for replicaset named development
Add test for replicaset named development

Not in previous commit as that also reformatted this class, so this makes the change here clearer.
