-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handler's configure session keyword parameter can be optional or requ…
…ired
- Loading branch information
Showing
6 changed files
with
96 additions
and
125 deletions.
There are no files selected for viewing
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
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
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
73 changes: 0 additions & 73 deletions
73
test/automated/handle/session_configuration/invalid_session_parameter.rb
This file was deleted.
Oops, something went wrong.
37 changes: 37 additions & 0 deletions
37
test/automated/handle/session_configuration/invalid_session_parameter_definition.rb
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
require_relative '../../automated_init' | ||
|
||
context "Handle" do | ||
context "Session Configuration" do | ||
context "Invalid Session Parameter Definition" do | ||
context "Session is a Positional Argument" do | ||
handler_class = Class.new do | ||
include Messaging::Handle | ||
|
||
def configure(session) | ||
end | ||
end | ||
|
||
test "Is an error" do | ||
assert_raises(Messaging::Handle::Build::Error) do | ||
handler_class.build | ||
end | ||
end | ||
end | ||
|
||
context "Session Is an Optional Positional Argument" do | ||
handler_class = Class.new do | ||
include Messaging::Handle | ||
|
||
def configure(session=nil) | ||
end | ||
end | ||
|
||
test "Is an error" do | ||
assert_raises(Messaging::Handle::Build::Error) do | ||
handler_class.build | ||
end | ||
end | ||
end | ||
end | ||
end | ||
end |
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