Skip to content

Instantly share code, notes, and snippets.

/help.rb Secret

Created July 27, 2016 22:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/b040a2de883ec3b58dfe415cd8f689a6 to your computer and use it in GitHub Desktop.
Save anonymous/b040a2de883ec3b58dfe415cd8f689a6 to your computer and use it in GitHub Desktop.
INVALID_OPTIONS = { name: 1,
arm: 1,
stop_index: 1,
prestress: 1,
begin_percentage: 1,
time_values: [100, 30, 50, 500, 200]}
OPTIONS = { name: "BK100",
arm: 0.25,
stop_index: 0.5,
prestress: 0.025,
begin_percentage: 0.025,
time_values: [0, 30, 50, 100, 200]}
assert_raises ArgumentError do
@instance.kincom(FILE, OPTIONS.merge!(arm: 1))
end
# => Succees.
INVALID_OPTIONS.each do |key, value|
assert_raises ArgumentError do
@instance.kincom(FILE, OPTIONS.merge(key: value))
end
end
# => Fails.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment