Skip to content

Commit

Permalink
Merge pull request #51 from charlesfrantz/master
Browse files Browse the repository at this point in the history
Stop catching interrupts in context blocks

Bumping to 0.12.7
  • Loading branch information
gus committed Oct 18, 2013
2 parents e1f331f + 131a874 commit b583fc7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions lib/riot/runnable.rb
Expand Up @@ -20,7 +20,7 @@ def initialize(description, &definition)
end

# Given a {Riot::Situation}, eval the provided block against it and then return a status tuple.
#
#
# @param [Riot::Situation] situation An instance of a {Riot::Situation}
# @return [Array<Symbol[, String]>] array containing at least an evaluation state
def run(situation)
Expand All @@ -39,22 +39,22 @@ def initialize(&definition)
super("setup", &definition)
end

# Calls {Riot::Situation#setup} with the predefined block at {Riot::Context} run-time. Though this is
# like every other kind of {Riot::RunnableBlock}, +run+ will not return a meaningful state, which means
# Calls {Riot::Situation#setup} with the predefined block at {Riot::Context} run-time. Though this is
# like every other kind of {Riot::RunnableBlock}, +run+ will not return a meaningful state, which means
# the reporter will likely not report anything.
#
# @param [Riot::Situation] situation the situation for the current {Riot::Context} run
# @return [Array<Symbol>] array containing the evaluation state
def run(situation)
situation.setup(&definition)
[:setup]
rescue Exception => e
rescue StandardError => e
[:setup_error, e]
end
end # Setup

# Used to decorate a helper. A helper generally ends up being a glorified method that can be referenced
# from within a setup, teardown, hookup, other helpers, assertion blocks, and assertion macro blocks;
# Used to decorate a helper. A helper generally ends up being a glorified method that can be referenced
# from within a setup, teardown, hookup, other helpers, assertion blocks, and assertion macro blocks;
# basically anywhere the {Riot::Situation} instance is available.
#
# context "Making dinner" do
Expand All @@ -74,8 +74,8 @@ def initialize(name, &definition)
@name = name
end

# Calls {Riot::Situation#helper} with the predefined helper name and block at {Riot::Context} run-time.
# Though this is like every other kind of {Riot::RunnableBlock}, +run+ will not return a meaningful
# Calls {Riot::Situation#helper} with the predefined helper name and block at {Riot::Context} run-time.
# Though this is like every other kind of {Riot::RunnableBlock}, +run+ will not return a meaningful
# state, which means the reporter will likely not report anything.
#
# @param [Riot::Situation] situation the situation for the current {Riot::Context} run
Expand Down
2 changes: 1 addition & 1 deletion lib/riot/version.rb
@@ -1,4 +1,4 @@
module Riot
VERSION = "0.12.6"
VERSION = "0.12.7"
end

0 comments on commit b583fc7

Please sign in to comment.