-
-
Save wolfedale/167e347aaf99c2b76923 to your computer and use it in GitHub Desktop.
rspec
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
output from my Rspec test: | |
1) test_host should have the correct dns entries with {:type=>"A", :address=>"192.168.20.1"} | |
Failure/Error: it { is_expected.to have_dns.with_type('A').and_address('192.168.20.1').config(nameserver: dns) } | |
expected test_host to have: | |
(address:"192.168.20.1", type:"A") | |
, but did not. other records were: | |
test_host. 3599 IN SOA ns1.gradwellcloud.com. contact4gradwell.test_host. 145298 14400 7200 2419200 3600 | |
test_host. 3599 IN NS ns1.gradwellcloud.com. | |
test_host. 3599 IN NS ns2.gradwellcloud.com. | |
test_host. 599 IN A 111.111.111.111 | |
# ./test_host.rb:15:in `block (3 levels) in <top (required)>' | |
2) test_host should have the correct dns entries with {:type=>"A", :address=>"192.168.20.1"} | |
Failure/Error: it { is_expected.to have_dns.with_type('A').and_address('192.168.20.1').config(nameserver: dns) } | |
expected test_host to have: | |
(address:"192.168.20.1", type:"A") | |
, but did not. other records were: | |
test_host. 3600 IN SOA ns1.gradwellcloud.com. contact4gradwell.test_host. 145298 14400 7200 2419200 3600 | |
test_host. 3600 IN NS ns1.gradwellcloud.com. | |
test_host. 3600 IN NS ns2.gradwellcloud.com. | |
test_host. 600 IN A 111.111.111.111 | |
# ./test_host.rb:15:in `block (3 levels) in <top (required)>' | |
3) test_host should have the correct dns entries with {:type=>"A", :address=>"192.168.20.1"} | |
Failure/Error: it { is_expected.to have_dns.with_type('A').and_address('192.168.20.1').config(nameserver: dns) } | |
expected test_host to have: | |
(address:"192.168.20.1", type:"A") | |
, but did not. other records were: | |
test_host. 3600 IN SOA ns1.gradwellcloud.com. contact4gradwell.test_host. 145298 14400 7200 2419200 3600 | |
test_host. 3600 IN NS ns2.gradwellcloud.com. | |
test_host. 3600 IN NS ns1.gradwellcloud.com. | |
test_host. 600 IN A 111.111.111.111 | |
# ./test_host.rb:15:in `block (3 levels) in <top (required)>' | |
code: | |
DNS_SERVERS = ['8.8.8.8', 'ns1.gradwellcloud.com', 'ns1.gradwellcloud.com'] | |
DNS_SERVERS.each do |dns| | |
describe 'test_host' do | |
it { is_expected.to have_dns.with_type('A').and_address('192.168.20.').config(nameserver: dns) } | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment