Module: Riot::Gear::OnceContextHelper
- Defined in:
- lib/riot/gear/context/once.rb
Instance Method Summary collapse
-
#once(description = "", &definition) ⇒ Riot::Gear::OnceRunnable
A setup helper that will only run once and only in the context it was defined in.
Instance Method Details
#once(description = "", &definition) ⇒ Riot::Gear::OnceRunnable
A setup helper that will only run once and only in the context it was defined in. This will not be run in any of its sub-contexts and it will run before any assertions … the same as any other setup block.
once "doing this one thing" do
topic.post "/user/things", :query => {"name" => "x"}
end
36 37 38 |
# File 'lib/riot/gear/context/once.rb', line 36 def once(description="", &definition) @setups << Riot::Gear::OnceRunnable.new(description, &definition) end |