Skip to content

Commit

Permalink
Fix naming of test_api specs so they run
Browse files Browse the repository at this point in the history
Incorrectly named ever since they were added 7dddebd, updated to take
into account the change of `subject` in 34220fc and rspec should/expect
style changes.
  • Loading branch information
domcleal committed Oct 27, 2016
1 parent 4ea9884 commit abe9a45
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions spec/classes/test_api.rb → spec/classes/test_api_spec.rb
Expand Up @@ -3,18 +3,18 @@
describe 'test::bare_class' do
describe 'rspec group' do
it 'should have a catalogue method' do
catalogue.should be_a(Puppet::Resource::Catalog)
expect(catalogue).to be_a(Puppet::Resource::Catalog)
end

it 'subject should return a catalogue' do
subject.should be_a(Puppet::Resource::Catalog)
expect(subject.call).to be_a(Puppet::Resource::Catalog)
end

describe 'derivative group' do
subject { catalogue.resource('Notify', 'foo') }

it 'can redefine subject' do
subject.should be_a(Puppet::Resource)
expect(subject).to be_a(Puppet::Resource)
end
end
end
Expand Down
4 changes: 2 additions & 2 deletions spec/defines/test_api.rb → spec/defines/test_api_spec.rb
Expand Up @@ -6,11 +6,11 @@

describe 'rspec group' do
it 'should have a catalogue method' do
catalogue.should be_a(Puppet::Resource::Catalog)
expect(catalogue).to be_a(Puppet::Resource::Catalog)
end

it 'subject should return a catalogue' do
subject.should be_a(Puppet::Resource::Catalog)
expect(subject.call).to be_a(Puppet::Resource::Catalog)
end
end
end
4 changes: 2 additions & 2 deletions spec/hosts/test_api.rb → spec/hosts/test_api_spec.rb
Expand Up @@ -3,11 +3,11 @@
describe 'foo.example.com' do
describe 'rspec group' do
it 'should have a catalogue method' do
catalogue.should be_a(Puppet::Resource::Catalog)
expect(catalogue).to be_a(Puppet::Resource::Catalog)
end

it 'subject should return a catalogue' do
subject.should be_a(Puppet::Resource::Catalog)
expect(subject.call).to be_a(Puppet::Resource::Catalog)
end
end
end

0 comments on commit abe9a45

Please sign in to comment.