This file contains hidden or 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
| func TestHeightsController_Index(t *testing.T) { | |
| threshold := big.NewInt(2) | |
| tests := []struct { | |
| name string | |
| status int | |
| }{ | |
| {"good clients", 200}, | |
| // Hard to do error cases without adding an if with difference setup. could add test helpers... | |
| } |
This file contains hidden or 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
| def diff(a, b, file = "current.diff") | |
| require 'rspec/expectations/differ' | |
| differ = RSpec::Expectations::Differ.new | |
| diff = differ.diff_as_object(a, b) | |
| File.open(file, "w+") { |f| f.write diff } | |
| system "mate", file | |
| end |