I'd prefer the following (unless there are multiple with_content statements):

```ruby
       should contain_file('/var/lib/puppet/puppet.git/hooks/post-receive').with({
         :owner   => 'puppet',
         :mode    => '0755',
         :require => %r{Git::Repo\[puppet_repo\]},
         :content => %r{BRANCH_MAP = \{[^a-zA-Z=>]\}},
      })