File: nasty_spec.rb

package info (click to toggle)
ruby-rspec-puppet 4.0.2%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,444 kB
  • sloc: ruby: 6,377; makefile: 6
file content (16 lines) | stat: -rw-r--r-- 522 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# frozen_string_literal: true

require 'spec_helper'

describe 'nasty' do
  it { expect(subject).not_to be_nil }
  it { expect(subject).to run.with_params('foo', 'bar').and_return('foo') }

  describe 'the underlying Run matcher' do
    it 'does not have its description manipulated by running the function' do
      run_matcher = run.with_params('foo', 'bar').and_return('foo')
      expect(subject).to run_matcher
      expect(run_matcher.description).to eq('run nasty("foo", "bar") and return "foo"')
    end
  end
end