RSpec::Networking

RSpec matchers for IP and MAC Addresses
Install
gem install rspec-networking
Usage
require "rspec/networking"
expect(obj).to be_an_ip_address
expect(obj).to be_an_ip_address.v4
expect(obj).to be_an_ip_address.localhost
expect(data).to include(addr: an_ip_address)
expect(obj).to be_a_mac_address
expect(obj).to be_a_mac_address.broadcast
expect(obj).to be_a_mac_address.multicast
expect(obj).to be_a_mac_address.unicast
expect(obj).to be_a_mac_address.from("xerox")
expect(obj).to be_a_mac_address.for(device)
expect(data).to include(addr: a_mac_address)
Resources
Contributing
Yes please :)
- Fork it
- Create your feature branch (
git checkout -b my-feature
) - Ensure the tests pass (
bundle exec rspec
) - Commit your changes (
git commit -am 'awesome new feature'
) - Push your branch (
git push origin my-feature
) - Create a Pull Request